Error: Cannot Rename Column That Belongs to a Clustering Key
Issue
The following error apears:
Error: UncheckedSQLException: error updating schema: Cannot rename column '<column>' which belongs to a clustering key
Environment
Destination: Snowflake
Resolution
To resolve this issue, do the following:
In Snowflake, confirm that the column referenced in the error is part of a clustering key in the destination table.
Use the
ALTER TABLE
command to drop the clustering key that includes the column. For more information, see the Snowflake documentation on dropping clustering keys.In Fivetran, wait for the next scheduled sync or trigger a manual sync:
i. Go to your connection page.
ii. In the top right, click Sync.
Cause
Snowflake prevents renaming columns that are part of a clustering key. As a result, this issue occurs when we try to rename such a column in your destination.