You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
point-in-time snapshot - a stand-alone copy of a database table as it was at a particular moment
dbt snapshot - a process that can merge a data source into a type 2 SCD table
Problem overview
Some users have source tables that represent point-in-time snapshots. e.g., a table named users_20190701 might contain a read-only copy of the users table made at midnight on July 1st, 2019. The time of the copy was made is not recorded as an attribute within the table -- the only metadata representing the time of the copy is within the table name itself.
⚠️ If any of those users are using dbt snapshots to build a type 2 SCD they could be subject to a breaking change by #4513.
Setup
See "Steps to Reproduce" below
Output
Suppose consecutive dbt snapshots are taken for those 3 dates at the following timestamps:
As of this writing, specifying the updated_at parameter isn't documented here or here for the check_cols strategy. However, it can be configured like this (whether intended or not):
github-actionsbot
changed the title
[Bug] updated_at ignored for check_cols snapshots
[CT-498] [Bug] updated_at ignored for check_cols snapshots
Apr 15, 2022
Is there an existing issue for this?
Current Behavior
Definitions
Problem overview
Some users have source tables that represent point-in-time snapshots. e.g., a table named
users_20190701
might contain a read-only copy of theusers
table made at midnight on July 1st, 2019. The time of the copy was made is not recorded as an attribute within the table -- the only metadata representing the time of the copy is within the table name itself.Setup
See "Steps to Reproduce" below
Output
Suppose consecutive dbt snapshots are taken for those 3 dates at the following timestamps:
After #4513
Expected Behavior
Before #4513
The output of the following columns differs before and after:
(I know, timestamps in tables aren't the easiest to read 😅 )
Steps To Reproduce
Example
This is a simple example showing changes to a table over 3 days, including insertion and deletions.
Configuring the table copies as a source
An example source configuration in dbt is:
Configuring a dbt snapshot
As of this writing, specifying the
updated_at
parameter isn't documented here or here for the check_cols strategy. However, it can be configured like this (whether intended or not):Taking dbt snapshots
Processing successive days:
Relevant log output
No response
Environment
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: