Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAP-548] Make cluster key sorting optional on table creation #917

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Slanman3755
Copy link

@Slanman3755 Slanman3755 commented Feb 27, 2024

resolves #606
docs dbt-labs/docs.getdbt.com/#

Problem

Creating a table with a cluster key always adds an order by to the create table statement. This is usually not necessary and should be optional.

Solution

Add a new optional config flag for table creation (order_by_cluster_key) that can enable or disable the addition of the order by statement when a cluster key is present.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes label Feb 27, 2024
@Slanman3755
Copy link
Author

I copied a generic test for this new feature. I may need help making it more practical. There should probably also be a unit test for this change but I did not see any unit tests already in place for the cluster_by config field that I could easily add to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADAP-548] [Feature] Flag to opt out of order by when cluster keys are specified
1 participant