[CT-3179] [Feature] Handle multiple changes in one snapshot run #8760
Labels
enhancement
New feature or request
snapshots
Issues related to dbt's snapshot functionality
wontfix
Not a bug or out of scope for dbt-core
Is this your first time submitting a feature request?
Describe the feature
One run of
dbt snapshot
can currently only handle one change per unique key. It would be useful to support multiple changes to data in onedbt snapshot
run. This would mean supporting also "immutable" tables (that contain new rows for every mutation of a key), not just mutable tables.Even though "immutable" tables already keep history, it's not in an SCD2 format.
See an example below.
Input data:
Result of
dbt snapshot
:What I would expect:
I propose to introduce this change with a configuration or snapshot strategy, as it would definitely produce different behavior and it could be a breaking change for current users (as also noted in 7138).
Describe alternatives you've considered
An alternative solution is to build a macro to transform "immutable" data to SCD2 format.
The disadvantage of this approach would be that different functionality would have a similar purpose: transform data to SCD2 format.
Who will this benefit?
Anybody who would like to bring "immutable" data to the same SCD2 format as
dbt snapshot
outputs.Are you interested in contributing this feature?
If there is interest, yes.
Anything else?
No response
The text was updated successfully, but these errors were encountered: