Closed Catisyf closed 7 months ago
Please do add this functionality. Although I'd suggest replacing the current _dbt_copied_at
field which uses current_timestamp
since Snowflake recommends against using that function in a Snowpipe.
@jtmcn see #281 for your suggestion. I'd welcome PR for this!
Description & motivation
resolves: #276
dbt currently supports the following metadata columns for snowpiped table.
This PR adds a new metadata column
metadata_file_last_modified
(metadata$file_last_modified
), which returns the last modified timestamp of the staged file the current row belongs to. This metadata is useful for a use case where we'd like to filter staged files from an S3 bucket after a certain cutoff date, and we can't easily infer such date from the file name.This is a simple modification and I have tested the changes in our dbt project. It works as expected.
Checklist