This guide covers how to:

  1. Enable change tracking on a Snowflake table
  2. Check if a Snowflake table has change tracking enabled

Requirements

  • You have a Snowflake account with data loaded in a table.
  • You have a Snowflake user account with OWNERSHIP privilege for the table.

1

Enable change tracking on a Snowflake table

Enable change tracking on a Snowflake table by running the following SQL statement:

ALTER TABLE <table_name> SET CHANGE_TRACKING = TRUE;

You must run this statement with the role that is the owner of the table.

2

Check if a Snowflake table has change tracking enabled

To check if a table has change tracking enabled, use the following query:

SHOW TABLES LIKE '<table_name>';

This statement returns:

+--------------+----------------------+-----------------+---------------------+------------------------------+
|   name       | automatic_clustering | change_tracking | search_optimization | search_optimization_progress |
+--------------+----------------------+-----------------+---------------------+------------------------------+
| <table_name> | OFF                  | ON              | OFF                 |                              |
+--------------+----------------------+-----------------+---------------------+------------------------------+

Then you can see if change_tracking is ON or OFF.