File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
dbt/include/databricks/macros/relations/materialized_view Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 99 {%- set comment = materialized_view .config [" comment" ].comment - %}
1010 {%- set refresh = materialized_view .config [" refresh" ] - %}
1111
12- {%- set columns = get_column_schema_from_query(sql) - %}
13- {%- set model_columns = model .get (' columns' , {}) - %}
14- {%- set model_constraints = model .get (' constraints' , []) - %}
15- {%- set columns_and_constraints = adapter .parse_columns_and_constraints (columns, model_columns, model_constraints) - %}
16- {%- set target_relation = relation .enrich (columns_and_constraints[1 ]) - %}
17-
18- create materialized view {{ target_relation .render () }}
19- {{ get_column_and_constraints_sql(target_relation, columns_and_constraints[0 ]) }}
12+ create materialized view {{ relation .render () }}
13+ {%- if config .persist_column_docs () - %}
14+ {%- set model_columns = model .columns - %}
15+ {%- set query_columns = get_columns_in_query(sql) - %}
16+ {%- if query_columns %}
17+ (
18+ {{ get_persist_docs_column_list(model_columns, query_columns) }}
19+ )
20+ {%- endif - %}
21+ {%- endif %}
2022 {{ get_create_sql_partition_by(partition_by) }}
2123 {{ liquid_clustered_cols() }}
2224 {{ get_create_sql_comment(comment) }}
You can’t perform that action at this time.
0 commit comments