Skip to content

Commit

Permalink
This changes makes the macro easier to read and makes the code work f…
Browse files Browse the repository at this point in the history
…or SQL Server without a custom adapter macro. Solved dbt-labs#3003
  • Loading branch information
mikaelene committed Jan 11, 2021
1 parent a4280d7 commit 0fb4290
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@

when matched
and DBT_INTERNAL_DEST.dbt_valid_to is null
and DBT_INTERNAL_SOURCE.dbt_change_type = 'update'
then update
set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to

when matched
and DBT_INTERNAL_DEST.dbt_valid_to is null
and DBT_INTERNAL_SOURCE.dbt_change_type = 'delete'
and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')
then update
set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to

Expand Down

0 comments on commit 0fb4290

Please sign in to comment.