Reputation: 61
I am trying to validate if CHANGE_TRACKING is enabled for a Snowflake Table. Is this information available in Information_Schema?
Upvotes: 5
Views: 5953
Reputation: 10059
As far as I know, it's not available in information_schema, but you can check change_tracking column of the SHOW TABLES command:
show tables like 'employees';
+-----------+----------------------+-----------------+---------------------+------------------------------+
| name | automatic_clustering | change_tracking | search_optimization | search_optimization_progress |
+-----------+----------------------+-----------------+---------------------+------------------------------+
| EMPLOYEES | OFF | ON | OFF | |
+-----------+----------------------+-----------------+---------------------+------------------------------+
SHOW TABLES https://docs.snowflake.com/en/sql-reference/sql/show-tables.html
You may use result_Scan function to process the output of SHOW TABLES command.
RESULT_SCAN https://docs.snowflake.com/en/sql-reference/functions/result_scan.html
Upvotes: 9