Skip to content

Fix snapshot meta column name overrides on second run (#639).#670

Merged
axellpadilla merged 1 commit into
dbt-msft:masterfrom
Benjamin-Knight:fix/#639-snapshot-partial-column-names
May 20, 2026
Merged

Fix snapshot meta column name overrides on second run (#639).#670
axellpadilla merged 1 commit into
dbt-msft:masterfrom
Benjamin-Knight:fix/#639-snapshot-partial-column-names

Conversation

@Benjamin-Knight

@Benjamin-Knight Benjamin-Knight commented May 20, 2026

Copy link
Copy Markdown
Collaborator

The existing-target branch was reading snapshot_meta_column_names as the full source of column names, so a partial override (e.g. only dbt_valid_to + dbt_valid_from) dropped the other defaults and the next snapshot run failed with KeyError: 'dbt_scd_id'. Start from the defaults dict and merge in each provided override key. Fixes #639

The existing-target branch was reading `snapshot_meta_column_names` as
the full source of column names, so a partial override (e.g. only
`dbt_valid_to` + `dbt_valid_from`) dropped the other defaults and the
next snapshot run failed with `KeyError: 'dbt_scd_id'`. Start from the
defaults dict and merge in each provided override key.
@axellpadilla axellpadilla merged commit c46173b into dbt-msft:master May 20, 2026
53 checks passed
@Benjamin-Knight Benjamin-Knight deleted the fix/#639-snapshot-partial-column-names branch May 21, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Second run of dbt snapshot missing valid from/to columns

2 participants