Repoint your dbt project to Databricks without rewriting models, tests, or business logic.
• Learn how to repoint your existing dbt project from any source warehouse to Databricks with minimal code changes
• Walk through the practical steps: adapter setup, namespace mapping, SQL dialect differences, development workflow, and production scheduling with Lakeflow Jobs
• Understand how to validate outputs model by model and cut over safely
More teams are running their dbt transformations on Databricks Lakehouse: an open platform with no lock-in, unified pipelines, built-in Unity Catalog governance, and strong price/performance.
Your dbt project works: models compile, tests pass, and your transformation logic lives in version-controlled SQL and YAML, not hardwired into any one warehouse. dbt’s open adapter framework is designed for exactly this decoupling, so moving from one cloud data warehouse to another is mostly a matter of changing the adapter and connection config plus a few dialect tweaks - not rewriting your DAG or business logic.
Databricks delivers on that with the co-engineered dbt-databricks adapter, open lakehouse storage (Delta Lake and Apache Iceberg™), Unity Catalog, and Lakeflow Jobs that give you an open, unified platform where dbt runs with built-in governance and strong price/performance from day one, making it a great place to run your dbt workloads. That’s why more than 3,000 organizations already run dbt on Databricks.
If you’ve been evaluating a move, the good news is you don’t have to rebuild your project. This post walks through how to repoint a working dbt project to Databricks by swapping the adapter and profile, handling a handful of SQL differences, and keeping your transformation logic inside dbt.
A recurring challenge with data warehouse migration projects is trying to move everything at once, which can lead to delays and bottlenecks. A better approach is to start with the transformation layer, which is a fast way to unlock cost savings from a migration.
dbt projects are already modular and testable. That makes them ideal candidates for an incremental migration. When you repoint dbt to Databricks, you get:

Scope: This guide covers repointing your dbt transformation layer only. It assumes your source data is already in Databricks — landed as Delta or Iceberg tables and registered in Unity Catalog — and that your catalogs and schemas exist. Migrating the data itself and setting up Unity Catalog are separate efforts; see the Databricks migration guides and Lakebridge for those.
Before you start, make sure you have:
The model we will be migrating in this example is a standard analytics fact table built on top of two source models: orders and order_items. It aggregates order-level data to calculate total revenue and compiles a list of products sold for every individual transaction from the past year.
This model uses several common SQL dialect patterns, such as regexp_substr, div0 and object_construct, which often differ between data warehouses, making it a great example. Once you see how to handle these patterns here, you can apply the same approach to every other model in your project.
This part covers the one-time migration work which involves installing the adapter, mapping namespaces, and handling dialect differences.
Install the dbt-databricks adapter
The dbt-databricks adapter is the bridge between your dbt project and the Databricks Lakehouse warehouse. It translates dbt's compiled SQL into Databricks-compatible queries.
(dbt Platform users: select "Databricks" as the connection type in a new environment as detailed in the dbt docs - the adapter is installed automatically.)
Add a Databricks target to `profiles.yml`. Keep your existing target intact; you'll need it during validation. Add a second target alongside it:
Verify the connection:
You should see: Connection test: [OK connection ok].
If you still cannot connect, follow the connection troubleshooting steps in the Databricks + dbt integration guide and the dbt Databricks profile reference.
Pro Tip: http_path determines whether queries run on a SQL warehouse (recommended for dbt) or an all-purpose cluster. SQL warehouses offer better price/performance for SQL-heavy workloads.
Databricks uses a three-level namespace: catalog.schema.table. Update the sources.yml entries that fct_orders reads from:
Update schema.yml to include tests
Pro Tip: If you skip database:, queries land in the workspace's default catalog. Set it explicitly.
Now run dbt compile for the model:
Our fct_orders model produced 3 compilation errors as detailed below, all dialect-related. This is expected and while these three are representative of the dialect issues most projects hit, they aren't the whole story: larger migrations also run into incremental-model strategies, snapshots, and semi-structured functions with no direct equivalent.
We intentionally use an example model that relies on dialect-specific patterns like REGEXP_SUBSTR with positional parameters, DIV0 for safe division, and OBJECT_CONSTRUCT for JSON building - the kind of functions that differ between warehouses. That way, the initial dbt run errors become a guide through the conversion process, showing you how to turn these into portable macros and Databricks-friendly SQL so you can apply the same fixes across the rest of your project. To demonstrate, we will walk you through each error, the root cause, and the fix. Before diving into the errors, a note on portability: where a function has a portable equivalent, dbt's cross-database macros (the dbt.* namespace) let you write it once so it compiles on any warehouse — worth adopting as you standardize. We'll walk through each error and its fix, then show how to automate the conversion across a large project.
Databricks follows Apache SQL dialect and only supports 2 parameters for REGEXP_SUBSTR
Fix: use Databricks’ native regexp_extract() function
You could also let the Genie Code make this conversion for you, fixing dialect gaps like this is exactly what it's good at. We'll do all three by hand so you can see what's changing.
Root cause: some warehouses use DIV0 to return 0 instead of throwing an error when dividing by zero.
Fix: add dbt_utils to your packages and use its built-in safe_divide function
Cannot resolve routine `object_construct`
Fix: Use the Databricks named_struct function
Re-run compile:
Compiles successfully. Total dialect changes for this model: