Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

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

Closed
Slanman3755 wants to merge 3 commits intodbt-labs:mainfrom
Slanman3755:ADAP-548/optional-cluster-key-sorting
Closed

[ADAP-548] Make cluster key sorting optional on table creation#917
Slanman3755 wants to merge 3 commits intodbt-labs:mainfrom
Slanman3755:ADAP-548/optional-cluster-key-sorting

Conversation

@Slanman3755
Copy link
Copy Markdown

@Slanman3755 Slanman3755 commented Feb 27, 2024

resolves dbt-labs/dbt-adapters#735
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
Copy Markdown
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.

@Slanman3755
Copy link
Copy Markdown
Author

Still waiting on feedback for this change.

@Slanman3755 Slanman3755 requested a review from a team as a code owner August 20, 2024 20:44
@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Feb 17, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers.

@github-actions github-actions Bot closed this Feb 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

2 participants