fsc-utils/models/datashare/_datashare___create_gold.sql
2023-06-07 13:56:49 -07:00

20 lines
382 B
SQL

{{
config(
materialized = 'incremental',
incremental_strategy = 'merge',
unique_key = 'ddl_hash',
merge_update_columns = [],
)
}}
{% if execute %}
SELECT
$${{- fsc_utils.generate_datashare_ddl() -}}$$ AS ddl,
md5(ddl) AS ddl_hash,
sysdate() as ddl_created_at
{% else %}
SELECT
null as ddl,
null as ddl_hash,
null as ddl_created_at
from dual limit 0
{% endif %}