-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use metadata for _dbt_copied_at in Snowpipe #282
Use metadata for _dbt_copied_at in Snowpipe #282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for opening @jtmcn!
two questions:
- can you confirm that
start_scan_time
is available in non-SnowpipeCOPY INTO
statements? Querying Metadata for Staged Files | Snowflake Documentation makes me think so, but want to double check - can imagine that this might constitute a breaking change for anyone? My gut tells me "no", but maybe someone who has a downstream model with logic that depends on this
_dbt_copied_at
column might see wildly different times?
Yes, the metadata fields are available when the query target is a Snowflake Stage
No, I don't think this constitutes a breaking change. The new value won't be used until the Snowpipe is recreated. There won't be wild differences within the same table. Also, the documentation says the
The existing value for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @jtmcn!
Description & motivation
resovles: #281
This change uses
metadata$start_scan_time
instead ofcurrent_timestamp
for the_dbt_copied_at
field on Snowflake Snowpipe creation.This is the method recommended in the Snowflake docs
Checklist