Snowflake - I want to create a log table of filenames I have loaded from S3

Viewed 33

We load several files a day for one table from S3 into Snowflake. I want to know how I can create a permanent log table of the filename, no of rows, successful/unsuccessful load etc.

1 Answers

Snowflake already maintains this info for you in a view called load_history. If you want to put this into a table you could insert into with this select:

select * from snowflake.ACCOUNT_USAGE.LOAD_HISTORY
Related