Skip to content

Conversation

@jorritsandbrink
Copy link
Collaborator

Description

Currently, the snowflake destination only interprets cluster hints on table creation. Any subsequent changes in cluster hints are ignored. This PR changes that, such that cluster hints are also interpreted on table alterations.

These three cases are supported:
(1) add clustering: without clustering -> with clustering
(2) change clustering: change set of cluster columns or column order
(3) drop clustering: with clustering -> without clustering

Note that there is no active hint change detection. Any changes in cluster hints are only processed when the current table alteration mechanism is triggered, which is only when a new column is added.

Related Issues

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
docs 7a4fa56 Commit Preview URL

Branch Preview URL
Nov 22 2025, 07:11 AM

@jorritsandbrink jorritsandbrink marked this pull request as ready for review November 22, 2025 12:52
@jorritsandbrink
Copy link
Collaborator Author

Hey @rudolfix, could you review this PR?

Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is excellent! end to end test is missing though: where we actually run the queries on snowflake. you can add a pipeline testing this in test_snowflake_pipeline.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLUSTER support on the ALTER TABLE for the Snowflake destination

3 participants