[Feature] Support for Bi temporality in dbt snapshot
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this your first time submitting a feature request?
- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
### Describe the feature
Hi Team,
I have a question regarding implementing bi-temporal data handling in dbt snapshots.
From my understanding, there are two types of temporality to consider:
1. **Uni-temporal**: This refers to tracking when a transaction occurred using single time periods. In dbt, this is managed with `dbt_valid_from` and `dbt_valid_to` to capture the validity period of data.
2. **Bi-temporal**: This involves tracking both the time when the transaction occurred and the validity of the data. Bi-temporal data requires two sets of temporal units, such as `foo_start_date` and `foo_end_date`, to capture both the transaction time and the validity of the data over time.
The problem I’m facing is that while dbt snapshots can handle uni-temporal data by updating the transaction date, they don't inherently support bi-temporal data management. Even if you maintain two sets of temporal units in your model, dbt snapshots only update the transaction date, not the validity period.
How can I implement bi-temporal data handling in dbt snapshots to properly manage both the transaction time and data validity?
Any guidance or suggestions would be greatly appreciated!
Thanks!
### Describe alternatives you've considered
_No response_
### Who will this benefit?
_No response_
### Are you interested in contributing this feature?
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.