Skip to main content

How to enable change tracking on a Snowflake table

This guide explains how to enable change tracking on a Snowflake table. You will need to enable change tracking to use the table with Propel.

We will cover how to alter a table to enable change tracking and how to check if it is enabled.

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

You can learn more about Snowflake's change tracking in Snowflake's official documentation.


Requirements​

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

Step 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.

Step 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.

Conclusion​

In this guide, you learned how to enable change tracking on a Snowflake table and how to check if a table has change tracking enabled.