contrib/dbt-factory: add job cluster compute option + Lakeflow Jobs rename - #170
Merged
Merged
Conversation
…ename Add a `use_serverless` prompt (default "yes") to the dbt-factory template so the generated job can run on serverless (unchanged) or a classic job cluster. In job-cluster mode the generated resources/__init__.py sets `job_cluster_key`, installs dbt-databricks as a per-task library, and defines a tunable `job_clusters` block; the README explains sizing (the cluster only orchestrates — queries run on the SQL warehouse). The vendored core is untouched. Rename "Databricks Workflows" to the current product name "Databricks Lakeflow Jobs" (singular "Databricks Lakeflow Job" for a deployed job) across the template and example docs, and add two FAQ entries (SDLC; Jinja/templating). Verification: offline unit tests (`make test`) cover both compute modes, and the e2e test (`make test-e2e`) now runs the full deploy+run+verify for both serverless and job-cluster modes. Co-authored-by: Isaac <no-reply@databricks.com>
MaximHammer
reviewed
Sep 22, 2026
The job cluster only orchestrates — each task submits SQL to the SQL warehouse and waits — so extra workers don't speed dbt up. Default the generated `job_clusters` block to a single-node cluster (num_workers 0 + singleNode profile) and update the sizing docs accordingly. Co-authored-by: Isaac <no-reply@databricks.com>
MaximHammer
approved these changes
Sep 22, 2026
pietern
approved these changes
Sep 22, 2026
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.
What
Extends the dbt-factory template (and its example) with a compute choice, and updates naming to the current product.
Job cluster support
use_serverlessprompt (defaultyes). Serverless is unchanged; choosingnorenders a classic job cluster.resources/__init__.py:job_cluster_keyon every task instead ofenvironment_key,dbt-databricksas a per-task library (pinned to the version in the venv; installed once on the shared cluster),job_clustersblock (spark_version18.x-scala2.13= DBR 18 LTS,{{smallest_node_type}}, autoscale 1–4).databricks_dbt_factorycore is untouched (it already supportsjob_cluster_key), so the vendor-sync CI is unaffected. The serverless rendering is byte-for-byte unchanged.databricks.ymlonly syncsdbt_serverless_env.yamlin serverless mode.Rename to the current product name
Docs
Verification
make test): 36 passed.tests/test_load_resources.pyis now templated so its assertions match each compute mode.make test-e2e): parametrized over both compute modes — each does a realbundle init → deploy → run → verify → teardown. Both serverless and job cluster pass on a live workspace (job SUCCESS; all six fixture tables materialized; the job cluster provisions on18.x-scala2.13).