File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
dbt/include/global_project/macros/materializations/snapshots Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 101
101
left outer join snapshotted_data
102
102
on {{ unique_key_join_on(strategy .unique_key , " snapshotted_data" , " source_data" ) }}
103
103
where {{ unique_key_is_null(strategy .unique_key , " snapshotted_data" ) }}
104
- or ({{ unique_key_is_not_null(strategy .unique_key , " snapshotted_data" ) }} and {{ strategy .row_changed }})
104
+ or ({{ unique_key_is_not_null(strategy .unique_key , " snapshotted_data" ) }} and ( {{ strategy .row_changed }})
105
105
106
106
)
107
107
230
230
231
231
232
232
{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}
233
- {% if strategy . unique_key | is_list %}
234
- {% for key in strategy . unique_key %}
233
+ {% if unique_key | is_list %}
234
+ {% for key in unique_key %}
235
235
{{ identifier }}.dbt_unique_key_{{ loop .index }} = {{ from_identifier }}.dbt_unique_key_{{ loop .index }}
236
236
{%- if not loop .last %} and {%- endif %}
237
237
{% endfor %}
245
245
{% if unique_key | is_list %}
246
246
{{ identifier }}.dbt_unique_key_1 is null
247
247
{% else %}
248
- {{ identifer }}.dbt_unique_key is null
248
+ {{ identifier }}.dbt_unique_key is null
249
249
{% endif %}
250
250
{% endmacro %}
251
251
254
254
{% if unique_key | is_list %}
255
255
{{ identifier }}.dbt_unique_key_1 is not null
256
256
{% else %}
257
- {{ identifer }}.dbt_unique_key is not null
257
+ {{ identifier }}.dbt_unique_key is not null
258
258
{% endif %}
259
259
{% endmacro %}
You can’t perform that action at this time.
0 commit comments