dbt with Microsoft Fabric: Setup, Warehouse, Lakehouse & Jobs
Want to use dbt with Microsoft Fabric but unsure whether to install an adapter, create a dbt job, or connect an existing dbt project? Choose the right route, run a real test and understand the permissions and limitations before moving to production.
Updated November 24, 2026 · Independent hands-on guide
dbt-fabric adapter and connect it to a Fabric Warehouse. If your organization already uses dbt platform, connect the platform to the Warehouse using its managed connection and deployment workflows. A Lakehouse uses a separate Spark-based adapter: its read-only SQL analytics endpoint is not a target for SQL write materializations.Watch dbt work inside Microsoft Fabric
These English-language Microsoft sessions cover the actual integration. Start with the hands-on demo, then use the second video for architecture and adapter decisions.
Creating and running a Fabric dbt job
Microsoft Reactor demonstrates native dbt jobs from 17:44. The same recording covers dbt platform setup at 7:03, results and lineage, and adapters at 31:17. Recorded April 2026; use current GA documentation for newer UI and limits.
Watch the native job demo on YouTubeWhere dbt fits in Fabric
Microsoft Fabric and dbt Labs discuss the Warehouse-versus-Spark decision, managed dbt jobs and the wider analytics engineering workflow. This is a discussion, not a click-by-click tutorial.
Watch Microsoft’s dbt integration discussionVideos load only after you select Play. If your company blocks embedded videos, use the direct YouTube links. Video availability and captions depend on their publishers.
Which way should you run dbt in Fabric?
The best option depends on who manages the development environment, where your project lives and whether you need dbt platform features beyond the managed Fabric job.
Use the Jaffle Shop sample to confirm that a job can create models, run tests and show lineage. Then connect your own repository or move on to the detailed native-jobs guide. Follow the no-install walkthrough.
Native Fabric dbt job
Managed execution, built-in scheduling and run monitoring in Fabric. Good for supported adapters and an all-Fabric workflow.
No local CLI needed for the sampleLocal dbt + VS Code
Use your editor, Git and compatible packages; execute model SQL against a Fabric Warehouse through dbt-fabric.
dbt platform + Fabric
Connect an existing managed dbt project to Fabric using its supported Warehouse connection, CI jobs and deployment features.
Separate dbt licensing and setup applyAdvertisements
Get started with a native Fabric dbt job
This is the simplest first success path because Microsoft’s sample gives you project files, a Warehouse, test data and a managed runner in one workflow. The dbt job feature is generally available, not merely a roadmap item.
- Open a Fabric-enabled workspace where you have at least the Contributor role. Make sure your identity has the appropriate permissions to create a dbt item and write into the test Warehouse.
- Choose New item → dbt job. Name the new job and select Practice with Sample Project.
- Select the Jaffle Shop project. It contains example orders, payments and customers. Choose the Warehouse profile and create a new dedicated Warehouse for the lab.
- Leave the sample seed option enabled so Fabric can load the project’s sample CSV data; verify the selected schema before clicking Connect.
- In the dbt job toolbar choose Build and then Run. This runs the selected project resources and their tests. Watch for failures in the Output panel.
- Open the Warehouse to confirm the created relations; inspect Compiled SQL to see the SQL generated from the project; use Lineage to inspect model dependencies.
- After a correct manual run, add a schedule only if ingestion and refresh timing support it. Delete the dedicated lab resources when no longer needed, according to your workspace’s change policy.
What is actually running?
Fabric uses a managed dbt job runtime. Microsoft’s current overview lists runtime V1.0 with dbt Core 1.11 and Python 3.12; the managed Warehouse adapter is dbt-fabric and the Lakehouse adapter is dbt-fabricspark. These are managed runtime versions—not permission to assume your laptop’s dbt v2 distribution is supported by the job. Confirm the current adapter matrix before importing an existing project.
Official walkthrough: Practice with a sample dbt project.
Connect dbt in VS Code to a Fabric Warehouse
Use this route when you want to edit dbt models locally, run commands in a terminal and manage the full project through Git. The commands target a Fabric Warehouse, not a Lakehouse SQL analytics endpoint.
Install the supported adapter
Create a new virtual environment, install Python and the current dbt-fabric adapter supported by your project, and install Microsoft’s SQL Server ODBC driver on your development machine. Check the adapter’s compatibility notes for your installed dbt version before upgrading.
python -m venv .venv
# Activate .venv using your operating system's instructions
python -m pip install dbt-fabric
dbt --version
az loginUse your Warehouse connection details for the SQL hostname and database, not a Lakehouse Files path. On supported environments, Azure CLI sign-in is a convenient interactive method. Use an approved identity with appropriate Warehouse access; service-principal automation requires a separately supported setup.
Configure a development profile
Create a local profiles.yml in your dbt user configuration directory and set the profile name to match the project’s profile: field. These placeholders must be replaced with your actual Fabric Warehouse SQL connection details.
fabric_dbt_starter:
target: dev
outputs:
dev:
type: fabric
driver: 'ODBC Driver 18 for SQL Server'
host: 'YOUR_WAREHOUSE_SQL_HOST'
port: 1433
database: 'YOUR_WAREHOUSE_NAME'
schema: 'YOUR_APPROVED_DEV_SCHEMA'
authentication: CLI
threads: 4Microsoft’s Warehouse tutorial shows host; some adapter reference examples show server. If your installed version rejects a field, follow the current adapter documentation for that version rather than trying random authentication properties. Keep secrets out of the project repository and do not disable certificate validation to bypass a connection error.
Validate the connection before building
dbt debug
dbt deps
dbt build
# Or run models separately, then validate:
dbt run
dbt testdbt debug verifies configuration and connectivity; it does not prove every model will build. Use the companion project in the next section to verify real results. For production, use isolated schemas and approved identity/CI settings rather than a developer’s personal sign-in.
Official sources: Microsoft’s Fabric Warehouse dbt setup and dbt’s Fabric adapter configuration.
Advertisements
Connect dbt platform to Microsoft Fabric
If your team already uses dbt platform for a managed IDE, Git integration and deployment jobs, you can point its Fabric connection at a Warehouse. This differs from the native Fabric dbt job: the dbt platform manages development and job execution, while the Warehouse executes supported transformations.
- Prepare a Fabric Warehouse and an approved Microsoft Entra service-principal identity with the appropriate Fabric and Warehouse permissions.
- In dbt platform, create or open the project and choose the Fabric connection. Enter the Warehouse SQL hostname, port
1433and database name provided by Fabric. - Configure the supported service-principal authentication using your organization’s secret-management process; never put secrets in SQL models, screenshots or Git.
- Test the connection, then bring in the project’s models and source definitions. Start with a small model and a data-quality test.
- Use Git branches and review workflows before adding deployment jobs or CI checks. Validate compiled SQL and results in a dedicated nonproduction schema.
The dbt Labs Fabric quickstart demonstrates the Warehouse connection and Jaffle Shop data. For an additional video demonstration, Microsoft’s Reactor session above includes dbt platform setup from 7:03.
Try a complete Warehouse dbt project with verifiable output
Once your Warehouse connection works, use a tiny project that makes success measurable. This starter contains a CSV seed and two models. The figures are fictional and deliberately small; the expected calculation has been checked independently.
Read the deeper dbt modeling and testing guide for staging, incremental models, snapshots and CI design. The exercise here is specifically about getting a first dbt project running against Fabric.
Five input orders
Three paid orders, one refund and one pending order, represented in integer cents.
Two models
stg_orders cleans the source shape; fct_sales calculates amounts.
Expected net
$225.00 = $245 paid less $20 refunded. Pending $30 is excluded.
Input CSV
order_id,status,amount_cents
1,paid,12000
2,paid,8000
3,paid,4500
4,refunded,-2000
5,pending,3000Staging model
-- models/stg_orders.sql
select order_id, status, amount_cents
from {{ ref('orders') }}Business-facing model
-- models/fct_sales.sql
select
sum(case when status = 'paid' then amount_cents else 0 end) as paid_cents,
sum(case when status = 'refunded' then amount_cents else 0 end) as refund_cents,
sum(case when status in ('paid', 'refunded') then amount_cents else 0 end) as net_cents
from {{ ref('stg_orders') }}Project configuration and data tests
The project name in dbt_project.yml must match its model configuration section, and profile must match the name in your local profiles.yml. Fabric-managed jobs configure the adapter connection through their own profile UI.
name: 'fabric_dbt_starter'
version: '1.0.0'
config-version: 2
profile: 'fabric_dbt_starter'
model-paths: ['models']
seed-paths: ['seeds']
models:
fabric_dbt_starter:
+materialized: view
fct_sales:
+materialized: tableSave the CSV under seeds/orders.csv, the two SQL models under models/, and the following test definitions under models/schema.yml.
version: 2
models:
- name: stg_orders
columns:
- name: order_id
data_tests:
- unique
- not_null
- name: status
data_tests:
- accepted_values:
arguments:
values: ['paid', 'refunded', 'pending']
- name: fct_sales
columns:
- name: net_cents
data_tests:
- not_nullUse dbt build to seed, build and run the declared tests. Open the resulting fct_sales relation in the Warehouse and check the three figures. If the project builds but the results differ, the problem is not solved: inspect the generated SQL, source values and business logic. The ZIP companion contains dbt_project.yml, SQL models, data tests, CSV and setup notes.
For this simple practice project, the stg_orders output should contain five records. It tests order ID uniqueness, non-null keys and accepted status values; the fact model should contain one aggregate row. A passing build is not proof that larger real-world source systems are valid.
Fabric Warehouse vs Lakehouse: where should dbt write?
| Question | Fabric Warehouse | Fabric Lakehouse |
|---|---|---|
| Recommended dbt route | Native dbt job with Warehouse adapter or external dbt-fabric | Native dbt job with dbt-fabricspark adapter, or another supported Spark adapter/runtime path |
| Transformation engine | Warehouse T-SQL processing | Spark-based transformations over Lakehouse tables |
| Use the Lakehouse SQL analytics endpoint as a write target? | Not applicable | No. The Lakehouse SQL analytics endpoint is read-only; use the supported Spark write path for Lakehouse dbt materializations |
| What must you confirm? | Warehouse identity, T-SQL support, schema/materialization behavior, adapter version | Lakehouse permissions, Spark adapter compatibility, runtime, Delta table behavior, resource consumption |
Important: switching the adapter alone does not guarantee that every Warehouse SQL model will run unchanged on Spark. SQL dialects, macro dispatch, incremental strategies, data types and permissions can differ. Validate a representative project before moving its production jobs.
For storage architecture, continue with our Fabric Lakehouse tutorial or Fabric SQL Database guide when the question is about operational databases rather than analytical transformations.
Schedule dbt and monitor its results
For a standalone managed job, use the built-in Schedule tab after the first manual run passes. For an end-to-end ETL/ELT workflow, place an existing dbt job inside a Fabric pipeline after ingestion and before downstream validation or reporting.
Recommended workflow
Copy/ingest data → dbt build and tests → validate business totals → refresh downstream consumption if required. Use pipeline success and failure dependencies so dbt does not start before ingestion is ready. A wall-clock schedule alone cannot guarantee upstream completion.
Microsoft documents a dbt job activity that can select an existing job and pass runtime parameters or selectors. It supports a choice of auth methods for the activity connection, including OAuth, service principal and workload identity, subject to the target scenario. Read the official pipeline activity guide and our Fabric Data Pipelines tutorial before production orchestration.
For GitHub-connected native jobs, Microsoft’s current path executes from a selected repository branch and requires dbt_project.yml at the repository root and a classic PAT for repository authentication. That path is not the same as editing a local project in the Fabric UI. See the GitHub dbt job guide.
Common dbt + Fabric errors and how to investigate
| Symptom | Likely next check |
|---|---|
dbt debug cannot connect | Use the exact Warehouse SQL endpoint, database, ODBC driver and Azure CLI identity. Confirm the adapter version and approved Warehouse permissions. |
| Cannot create schemas or tables | Read/write permissions to the intended Warehouse/schema; confirm that the connection is not pointed at a read-only Lakehouse SQL endpoint. |
| dbt job item does not appear | Check your Fabric tenant/workspace feature access, workspace role and current item availability; do not assume a local CLI install fixes a missing managed item. |
| Warehouse works, Lakehouse adapter fails | Verify the Spark-specific adapter and runtime; SQL Warehouse and Spark do not share identical materializations or syntax. |
| A selector runs nothing | Confirm that the selected model/tag/path exists and that the resolved selector actually includes resources. An empty selection is not equivalent to a successful model build. |
| GitHub repository fails to import | Check the classic PAT, selected branch, required root-level dbt_project.yml, repository access and supported project size. |
| Job succeeds but measures look wrong | Compare output rows, grain, business totals and model tests. Compiled SQL and lineage help diagnosis but do not replace business reconciliation. |
| Run repeatedly incurs unexpected compute | Compare job duration and compilation overhead with the current managed runtime’s no-build-cache behavior. Check concurrency, selection and Capacity Metrics rather than assuming price per run. |
For broader project-level issues—late-arriving records, unstable incremental models, snapshots and slim CI—continue to dbt Best Practices: Models, Tests and CI.
Frequently asked questions
Does dbt work natively inside Microsoft Fabric?
Yes. Fabric has generally available native dbt jobs with managed execution, monitoring and scheduling. Supported adapters include Warehouse and Lakehouse, but their underlying engines and supported operations differ.
Do I need to install dbt Core to use Fabric dbt jobs?
No. Microsoft’s native sample uses the managed job item and runtime. Local development with VS Code or dbt-fabric is an alternative route, not a prerequisite.
Can I connect dbt directly to Fabric Lakehouse tables?
Use a supported Lakehouse/Spark adapter or another documented Spark writing path. The Lakehouse SQL analytics endpoint is read-only and cannot be used as the target for SQL write materializations.
Should I choose dbt platform or native Fabric jobs?
Choose based on your team’s existing project, source control, supported adapters, environments, operations and cost. dbt platform provides its own managed development and deployment capabilities; native jobs keep a supported dbt execution workflow within Fabric.
Can I run a GitHub dbt project in Fabric?
Yes, using Fabric’s documented GitHub-connected dbt job path. The current integration requires a classic GitHub PAT and a repository-root dbt_project.yml, and that connected repository isn’t edited from the Fabric UI.
Does Fabric dbt job runtime V1.0 mean dbt Core 1.0?
No. They are separate version identifiers. Microsoft’s managed dbt job runtime V1.0 currently documents dbt Core 1.11, with versioned adapters and Python 3.12.
How should I test a dbt project before scheduling it?
Start with an isolated schema and a small representative dataset. Check compiled SQL, model/test results, row counts and business totals, then test reruns and failure handling before enabling a schedule or pipeline dependency.
Official documentation and review notes
Reviewed November 24, 2026, using current Microsoft and dbt documentation. The worked SQL and YAML are illustrative examples independently checked for expected totals; they have not been executed in a live Fabric tenant. Check current adapter and runtime versions before a production change.
- Microsoft: dbt job overview, runtime and adapter limitations
- Microsoft: Jaffle Shop sample and verification
- Microsoft: dbt job configuration and authentication
- Microsoft: local dbt adapter setup for Fabric Warehouse
- dbt Developer Hub: dbt-fabric profile and adapter settings
- dbt Developer Hub: dbt platform and Fabric quickstart
- Microsoft: run GitHub dbt projects in Fabric
- Microsoft: dbt job capacity consumption
