dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.
dbt-fabricspark
The dbt-fabricspark package contains all of the code enabling dbt to work with Apache Spark in Microsoft Fabric. This adapter connects to Fabric Lakehouses via Livy endpoints and supports both schema-enabled and non-schema Lakehouse configurations.
Key Features
Livy session management with session reuse and robust connectivity across dbt runs
Lakehouse with schema support — auto-detects schema-enabled lakehouses and uses three-part naming (lakehouse.schema.table)
Lakehouse without schema — standard two-part naming ()
To contribute to this adapter codebase, see CONTRIBUTING.md.
Installation
pip install dbt-fabricspark
For local development using Azure CLI authentication (authentication: CLI), install with the cli extra:
pip install dbt-fabricspark[cli]
For an in-process Spark Session, install PySpark with the spark extra:
pip install "dbt-fabricspark[spark]"
PySpark remains optional: omit this extra when using Livy, or when the runtime
already provides PySpark, such as a Fabric Spark notebook. The session method
supports PySpark 3.5 and 4.x.
Note: The azure-cli optional dependency is only required for the CLI authentication mode. Service Principal (SPN) and Fabric Notebook (fabric_notebook) authentication modes do not need it.
Configuration
Add a target to profiles.yml. This example connects to a schema-enabled Lakehouse through Fabric Livy with Azure CLI authentication:
How CI authenticates to Fabric through the IMDS relay bridge
Issues, bug-bashing, help us help you
⚠️ Here's how you can get your issue triaged and fixed ASAP
In the age of AI, we should be innovating and shipping high-quality software daily.
So in this adapter, we try to fix bugs and ship features fast - and keep an extremely high bar for test coverage in CI before PRs merge to main.
Once you open an issue, please - try to be as descriptive as possible to give our human/AI maintainers the necessary details to reproduce the issue rapidly.
For example - if you can - create a dummy repro dbt project in your GitHub account - so the maintainers can reproduce your problem ASAP - see an example a well-written GitHub issue here.
If the issue is complex - once we have a fix identified, to gain more confidence, we might ask you install the adapter right from a PR branch to ensure the repro is gone in your setup as well, like so: