feat: add skip_optimize model config to opt out of post-materialization OPTIMIZE#1485
Open
moomindani wants to merge 1 commit into
Open
feat: add skip_optimize model config to opt out of post-materialization OPTIMIZE#1485moomindani wants to merge 1 commit into
skip_optimize model config to opt out of post-materialization OPTIMIZE#1485moomindani wants to merge 1 commit into
Conversation
…tion OPTIMIZE Adds a `skip_optimize` model config that lets users opt out of the post-materialization OPTIMIZE call without removing zorder/liquid_clustered_by/auto_liquid_cluster from the table definition. Complements the existing run-wide DATABRICKS_SKIP_OPTIMIZE var by allowing project-, folder-, or model-level opt-out via standard dbt config inheritance. Resolves databricks#703 Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #703
Description
Adds a
skip_optimizemodel config that lets users opt out of the post-materializationOPTIMIZEcall without removingzorder/liquid_clustered_by/auto_liquid_clusterfrom the table definition.Motivation: the existing opt-out today is the run-wide
DATABRICKS_SKIP_OPTIMIZEvar, which forces an all-or-nothing decision for the entire invocation. Several users in #703 asked for a config-level opt-out so they can:OPTIMIZEto Predictive Optimization while keepingauto_liquid_cluster=trueon the tableOPTIMIZEonly for specific high-churn models and let it run for the restOPTIMIZEout of band (workflow / job) instead of on the dbt critical pathBehavior:
skip_optimize(bool, defaultfalse)databricks__optimizeshort-circuits to a no-op even ifzorder/liquid_clustered_by/auto_liquid_clusteris set on the model — the clustering declaration remains in the table DDL, only theOPTIMIZESQL emission is suppressedDATABRICKS_SKIP_OPTIMIZEvar is unchanged (still skips run-wide)Docs follow-up
User-facing config reference lives in
dbt-labs/docs.getdbt.com(databricks-configs.md). A companion docs PR will be opened there to documentskip_optimizealongside the existingzorder/liquid_clustered_by/auto_liquid_clusterentries.Checklist
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.