-
Notifications
You must be signed in to change notification settings - Fork 89
Snowflake: add order_by_keys config #971
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
base: main
Are you sure you want to change the base?
Snowflake: add order_by_keys config #971
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @gwerbin-tive |
Thank you for your pull request! We could not find a changelog entry for this change in the dbt-snowflake package. For details on how to document a change, see the Contributing Guide. |
@gwerbin-tive Could you sign our Contributor License Agreement (if you haven't already)? Background here. |
BTW I'd appreciate advice on getting started with testing in the dbt-adapters repo. We don't write many custom macros at Tive and we don't have a formal testing process for the few that we do have, which are usually less complicated than this. |
0c30448
to
fe8691d
Compare
This supports custom ordering, which might help with downstream query optimization in some cases. For example, you could cluster on columns (a,b) and order by (a,c), or (a,b,c).
fe8691d
to
142c988
Compare
This supports custom ordering, which might help with downstream query optimization in some cases.
For example, you could cluster on columns (a,b) and order by (a,c), or (a,b,c).
resolves #735 (ADAP-548)
Problem
Setting
cluster_by_keys
also forces anorder by
using the same columns. This is not always desirable.Solution
Add a new config to control clustering and ordering separately. The user can explicitly pass
order_by_keys=none
to disable the default behavior, or pass a column name (or list of column names) to order by some other set of columns.Checklist