Skip to main content

I want to migrate my dbt project to Databricks with the help of an agent. Which tool should I use?

Summary

  • To convert a dbt project into a Spark Declarative Pipelines (SDP) pipeline, use Genie Code in the Databricks pipeline editor. Its migration capability is in Beta, and dbt is one of the project types it supports today.
  • You upload the project, create an empty ETL pipeline and give Genie Code the project path. It reads the models and dependencies, asks whether to generate SQL or Python, builds an intermediate representation, then converts, validates and repairs the pipeline.
  • The migration capability is part of Lakebridge, the Databricks Labs migration toolkit, and is also available through the Lakebridge Switch transpiler.
  • If you want to keep dbt as your transformation tool, you don't need a conversion: run the project on Databricks with the dbt task in Lakeflow Jobs and the dbt-databricks adapter.
  • Either way, review the generated code and run the result against the original project's output before you rely on it in production.

I want to migrate my dbt project to Databricks with the help of an agent. Which tool should I use?

Use Genie Code for pipeline development. Its migration capability, in Beta, takes an uploaded dbt project and converts it into a Spark Declarative Pipelines (SDP) pipeline end to end: it plans the migration, asks for the choices it needs, generates the pipeline source, then validates and repairs it. Run it from the pipeline editor in your workspace, and treat the output as a draft to review and test. If you'd rather keep dbt and only run it on Databricks, the dbt task in Lakeflow Jobs does that without any conversion.

What does migrating a dbt project to Databricks involve?

dbt is a transformation tool that turns SQL select statements into tables and views. A dbt project holds models, their dependencies and configuration. Moving it to Databricks can mean one of two things, and the right agent depends on which you choose:

Goal What changes Tool
Convert the project to SDP dbt models become pipeline datasets managed by SDP Genie Code migration (Beta)
Keep dbt, run it on Databricks Project stays in dbt and targets a Databricks SQL warehouse dbt task in Lakeflow Jobs with the dbt-databricks adapter

Converting gives you SDP's streaming tables, materialized views, expectations and incremental refresh. Keeping dbt preserves your existing workflow and tests. Pick the goal before you pick the tool.

What to look for in a migration agent

Capability Why it matters
Reads the whole project, including dependencies Models only make sense in the context of what they depend on
Asks for target choices up front SQL or Python output shapes everything that follows
Works from a tool-independent representation Captures the logic, not just the syntax, of each model
Validates and repairs its own output Catches broken references before you see them
Runs under your permissions It can't read or write data you couldn't
Leaves reviewable source You own the code after the migration

How Databricks approaches agent-assisted dbt migration

Convert a dbt project with Genie Code

The migration steps are short:

  1. Upload the project. Put it in a Unity Catalog volume (open the volume, then Upload to this Volume) or import it into a workspace directory.
  2. Create an empty pipeline. In Jobs & Pipelines, create an ETL pipeline.
  3. Prompt Genie Code with the path. For example: Migrate the project at /Volumes/my_catalog/my_schema/my_volume/my_project

Genie Code then generates a plan and executes it in four stages:

  • Read the source to understand the models, transformations and dependencies.
  • Gather inputs, pausing to ask, for example, whether to generate SQL or Python pipeline source.
  • Build an intermediate representation that captures the pipeline's logic independent of the source tool.
  • Convert, validate and repair, turning that representation into pipeline source and iterating until the pipeline is correct.

Genie Code's access follows your Unity Catalog permissions, and in the pipeline editor it asks before it runs code or updates the pipeline. Your workspace needs partner-powered AI features enabled and a supported region.

Validate the migrated pipeline

The docs are direct: review the migrated pipeline source and run the pipeline to confirm the results match the original project before relying on it in production. A practical sequence is to click Dry run in the pipeline editor to check the graph without updating data, run the pipeline into a development schema, and compare its tables with the ones your dbt project produces. Ask Genie Code to explain every step of the new pipeline, and add expectations for the data tests you relied on in dbt.

Where Lakebridge fits

This migration capability is part of Lakebridge, the Databricks Labs migration toolkit, and is also available through the Lakebridge Switch transpiler. Switch runs as a Databricks job from the command line and can target SDP output. Its own docs label it Experimental. For SQL scripts written in other dialects, Databricks points to the agentic code converter, not the pipeline migration.

Keep dbt and run it on Databricks

If you keep dbt, the dbt task for jobs runs your project from a workspace folder or a Git provider. It runs dbt deps, dbt seed and dbt run by default, sends the generated SQL to a serverless or pro SQL warehouse, and uses the dbt-databricks adapter, which Databricks recommends pinning to a specific version. A local coding agent with Databricks agent skills, or Genie Code CLI (Beta), can also edit your project files and run Databricks CLI commands for you.

FAQs

Is Genie Code's dbt migration generally available?

No. The migration capability is in Beta. Review and test its output before production use.

Will Genie Code ask me questions during the migration?

Yes. It pauses to gather required inputs, such as whether to generate SQL or Python pipeline source, before it builds the pipeline.

Which source projects can Genie Code migrate today?

The docs list a short set of supported project types that includes dbt, and say support for more sources is planned.

Do I have to convert my dbt project to use Databricks?

No. You can run dbt on Databricks with the dbt task in Lakeflow Jobs. Converting to SDP is a choice, not a requirement.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.