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

Run optimize after Liquid Clustering #448

Closed
dbarrundia-tiger opened this issue Sep 15, 2023 · 5 comments · Fixed by #463
Closed

Run optimize after Liquid Clustering #448

dbarrundia-tiger opened this issue Sep 15, 2023 · 5 comments · Fixed by #463
Labels
bug Something isn't working

Comments

@dbarrundia-tiger
Copy link

Disclaimer: this might be a question and not really a feature request.

Describe the feature

In the liquid clustering docs: https://docs.databricks.com/en/delta/clustering.html#how-to-trigger-clustering it says we should trigger OPTIMIZE table_name; to trigger clustering. So I am thinking if a model has liquid_clustered_by then we should run OPTIMIZE table_name; also

Describe alternatives you've considered

Somehow using this? https://github.com/databricks/dbt-databricks/blob/main/dbt/include/databricks/macros/adapters.sql#L368

Additional context

Please include any other relevant context here.

Who will this benefit?

Everyone using liquid_clustered_by

Are you interested in contributing this feature?

Let us know if you want to write some code, and how we can help.

@dbarrundia-tiger dbarrundia-tiger added the enhancement New feature or request label Sep 15, 2023
@dbarrundia-tiger
Copy link
Author

CC: @benc-db to see if you have any thoughts?

@benc-db
Copy link
Collaborator

benc-db commented Sep 18, 2023

I need to give this some thought, as from the docs this is something that needs to be done on on-going basis. We could use optimize on every run, but is that too often?

@benc-db
Copy link
Collaborator

benc-db commented Sep 18, 2023

Also, I need to dig a little more to understand the behavior today, because just inspecting the code, I would expect this


or
this
would already be running optimize

@dbarrundia-tiger
Copy link
Author

I need to give this some thought, as from the docs this is something that needs to be done on on-going basis. We could use optimize on every run, but is that too often?

That's what i thought also, but it's not running the optimize, meaning that macro is somehow not running as expected?

@benc-db
Copy link
Collaborator

benc-db commented Sep 26, 2023

Will investigate; changing the tag to 'bug' because I believe that the correct operation of this feature includes running optimize.

@benc-db benc-db added bug Something isn't working and removed enhancement New feature or request labels Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants