You are on page 1of 1

-- Query load history within a database --

USE COPY_DB;

SELECT * FROM information_schema.load_history;

-- Query load history gloabally from SNOWFLAKE database --

SELECT * FROM snowflake.account_usage.load_history;

// Filter on specific table & schema


SELECT * FROM snowflake.account_usage.load_history
where schema_name='PUBLIC' and
table_name='ORDERS';

// Filter on specific table & schema


SELECT * FROM snowflake.account_usage.load_history
where schema_name='PUBLIC' and
table_name='ORDERS' and
error_count > 0;

// Filter on specific table & schema


SELECT * FROM snowflake.account_usage.load_history
WHERE DATE(LAST_LOAD_TIME) <= DATEADD(days,-1,CURRENT_DATE);

You might also like