Skip to content

Commit

Permalink
Fix some typos in multiple unique_key (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank authored Oct 21, 2024
1 parent 5fd5467 commit 2bf3808
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
left outer join snapshotted_data
on {{ unique_key_join_on(strategy.unique_key, "snapshotted_data", "source_data") }}
where {{ unique_key_is_null(strategy.unique_key, "snapshotted_data") }}
or ({{ unique_key_is_not_null(strategy.unique_key, "snapshotted_data") }} and {{ strategy.row_changed }})
or ({{ unique_key_is_not_null(strategy.unique_key, "snapshotted_data") }} and ({{ strategy.row_changed }})

)

Expand Down Expand Up @@ -230,8 +230,8 @@


{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}
{% if strategy.unique_key | is_list %}
{% for key in strategy.unique_key %}
{% if unique_key | is_list %}
{% for key in unique_key %}
{{ identifier }}.dbt_unique_key_{{ loop.index }} = {{ from_identifier }}.dbt_unique_key_{{ loop.index }}
{%- if not loop.last %} and {%- endif %}
{% endfor %}
Expand All @@ -245,7 +245,7 @@
{% if unique_key | is_list %}
{{ identifier }}.dbt_unique_key_1 is null
{% else %}
{{ identifer }}.dbt_unique_key is null
{{ identifier }}.dbt_unique_key is null
{% endif %}
{% endmacro %}

Expand All @@ -254,6 +254,6 @@
{% if unique_key | is_list %}
{{ identifier }}.dbt_unique_key_1 is not null
{% else %}
{{ identifer }}.dbt_unique_key is not null
{{ identifier }}.dbt_unique_key is not null
{% endif %}
{% endmacro %}

0 comments on commit 2bf3808

Please sign in to comment.