Invalid Clustering Keys or Table Is Not Clustered Error
Issue
The following error appears within the Snowflake logs:
Invalid clustering keys or table [table_name] is not clustered.
Environment
Destination: Snowflake
Resolution
The Fivetran connector to the Snowflake destination has the option to use cluster keys to improve query performance.
It is not a requirement and the connector will work as normal if there are no cluster keys set for tables. The errors you are seeing occur when our queries check for cluster keys on tables and result in query failures.
In this case, there are no cluster keys on the tables which results in the error you are seeing.
The cluster keys:
- They are performed to understand the reasons for slow performance and suggest appropriate changes to the end user if applicable
- They only fail if there is no clustering key on a given table
- They are only performed once a day, and should not be generating any extra costs
- Information whether partitioning is present and what it applies to is important for the application to function