Use materialized views in the default-sql template

This commit is contained in:
Lennart Kats 2024-08-21 16:55:07 +02:00
parent f5df211320
commit a1bcb2812e
No known key found for this signature in database
GPG Key ID: 1EB8B57673197023
1 changed files with 1 additions and 2 deletions

View File

@ -1,10 +1,9 @@
-- This query is executed using Databricks Workflows (see resources/{{.project_name}}_sql_job.yml)
{{- /* We can't use a materialized view here since they don't support 'create or refresh' yet.*/}}
USE CATALOG {{"{{"}}catalog{{"}}"}};
USE IDENTIFIER({{"{{"}}schema{{"}}"}});
CREATE OR REPLACE VIEW
CREATE OR REPLACE MATERIALIZED VIEW
orders_daily
AS SELECT
order_date, count(*) AS number_of_orders