mirror of https://github.com/databricks/cli.git
Use materialized views in the default-sql template
This commit is contained in:
parent
f5df211320
commit
a1bcb2812e
|
@ -1,10 +1,9 @@
|
||||||
-- This query is executed using Databricks Workflows (see resources/{{.project_name}}_sql_job.yml)
|
-- 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 CATALOG {{"{{"}}catalog{{"}}"}};
|
||||||
USE IDENTIFIER({{"{{"}}schema{{"}}"}});
|
USE IDENTIFIER({{"{{"}}schema{{"}}"}});
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW
|
CREATE OR REPLACE MATERIALIZED VIEW
|
||||||
orders_daily
|
orders_daily
|
||||||
AS SELECT
|
AS SELECT
|
||||||
order_date, count(*) AS number_of_orders
|
order_date, count(*) AS number_of_orders
|
||||||
|
|
Loading…
Reference in New Issue