Find recently modified tables in Snowflake

The query below lists all tables that was modified (by alter statement) in the last 30 days.

Query

select table_schema,
       table_name,
       last_altered as modify_time
from information_schema.tables
where last_altered > DATEADD(DAY, -30, CURRENT_TIMESTAMP)
      and table_type = 'BASE TABLE'
order by last_altered desc;

Columns

  • table_schema - schema name
  • table_name - table name
  • modify_time - last modify time of table

Rows

  • One row: represents one table
  • Scope of rows: all tables which was last modified in the last 30 days in all schemas
  • Ordered by: modify time descending

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.