Skip to content

Commit

Permalink
Remove now-redundant check.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Nov 21, 2024
1 parent 9ad9ce5 commit a0afc9d
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,6 @@

{{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}

{# Raise an exception if the user has selected the new_record mode for
hard deletes, but there is no dbt_is_deleted column in the target,
which would indicate it was created in a different mode. #}
{% if strategy.hard_deletes == 'new_record' %}
{% set target_cols = adapter.get_columns_in_relation(target_relation) %}
{% set ns = namespace(found_is_deleted_col = false) %}
{% for col in target_cols %}
{% if col.column == columns['dbt_is_deleted'] %}
{% set ns.found_is_deleted_col = true %}
{% endif %}
{% endfor %}
{% if not ns.found_is_deleted_col %}
{% do exceptions.raise_compiler_error('Did not find a dbt_is_deleted column in snapshot target. Changing the snapshot hard_deletes mode is not supported after a snapshot has been created.') %}
{% endif %}
{% endif %}

{% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}
{% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}

Expand Down

0 comments on commit a0afc9d

Please sign in to comment.