Skip to content

Commit 2bf3808

Browse files
authored
Fix some typos in multiple unique_key (#335)
1 parent 5fd5467 commit 2bf3808

File tree

1 file changed

+5
-5
lines changed
  • dbt/include/global_project/macros/materializations/snapshots

1 file changed

+5
-5
lines changed

dbt/include/global_project/macros/materializations/snapshots/helpers.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
left outer join snapshotted_data
102102
on {{ unique_key_join_on(strategy.unique_key, "snapshotted_data", "source_data") }}
103103
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 }})
105105

106106
)
107107

@@ -230,8 +230,8 @@
230230

231231

232232
{% 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 %}
235235
{{ identifier }}.dbt_unique_key_{{ loop.index }} = {{ from_identifier }}.dbt_unique_key_{{ loop.index }}
236236
{%- if not loop.last %} and {%- endif %}
237237
{% endfor %}
@@ -245,7 +245,7 @@
245245
{% if unique_key | is_list %}
246246
{{ identifier }}.dbt_unique_key_1 is null
247247
{% else %}
248-
{{ identifer }}.dbt_unique_key is null
248+
{{ identifier }}.dbt_unique_key is null
249249
{% endif %}
250250
{% endmacro %}
251251

@@ -254,6 +254,6 @@
254254
{% if unique_key | is_list %}
255255
{{ identifier }}.dbt_unique_key_1 is not null
256256
{% else %}
257-
{{ identifer }}.dbt_unique_key is not null
257+
{{ identifier }}.dbt_unique_key is not null
258258
{% endif %}
259259
{% endmacro %}

0 commit comments

Comments
 (0)