Skip to content

Commit

Permalink
Change name of config field
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Sep 25, 2024
1 parent 4d5ee91 commit 7a9e069
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}
{% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}
{% if config.get('dbt_valid_to_current_date') %}
{% set valid_to_expr = " = " ~ config.get('dbt_valid_to_current_date') %}
{% if config.get('dbt_valid_to_current') %}
{% set valid_to_expr = " = " ~ config.get('dbt_valid_to_current') %}
{% else %}
{% set valid_to_expr = " is null " %}
{% endif %}
Expand Down Expand Up @@ -217,7 +217,7 @@
{% endmacro %}

{% macro get_dbt_valid_to_current(strategy, columns) %}
{% set dbt_valid_to_current = config.get('dbt_valid_to_current_date') or "null" %}
{% set dbt_valid_to_current = config.get('dbt_valid_to_current') or "null" %}
{% do log("dbt_valid_to_current = " ~ dbt_valid_to_current, info=true) %}
coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})
as {{ columns.dbt_valid_to }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}

when matched
{% if config.get("dbt_valid_to_current_date") %}
and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current_date') }}
{% if config.get("dbt_valid_to_current") %}
and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}
{% else %}
and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null
{% endif %}
Expand Down

0 comments on commit 7a9e069

Please sign in to comment.