Registry / data / dbt-fabric

dbt-fabric

JSON →
library1.11.1pypypi✓ verified 25d ago

dbt-fabric is a dbt adapter plugin that enables dbt to connect to and manage data models within Microsoft Fabric Synapse Data Warehouses. It extends dbt-core with specific materializations, incremental strategies, and connection logic tailored for Fabric. The library is actively maintained, with version 1.9.9 being the latest, and sees frequent minor releases incorporating new features and compatibility updates.

pip install dbt-fabric
INSTALL
IMPORT
SIG · DBT-FABRIC
D
dbt-fabric
datapythonv1.11.1
Install
16.3s avg
Import
Disk
176MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 18s
py 3.11
✕ build_error
✓ 19s
py 3.12
✕ build_error
✓ 15.5s
py 3.13
✕ build_error
✓ 14.3s
py 3.9
✓ —
✓ 14.6s
176MB installed
● package 176MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dbt-fabric
dbt-fabric is primarily used via dbt CLI and profiles.yml configuration. Direct Python imports of classes from `dbt_fabric` are uncommon for standard dbt operations.
Users typically interact with dbt adapters through the `dbt` command-line interface and project configuration, not via direct Python imports in their models or scripts.

To use `dbt-fabric`, configure your `profiles.yml` with the `type: fabric` adapter. Ensure you have the necessary ODBC driver (e.g., 'ODBC Driver 18 for SQL Server') installed and configured on your system. Connection details like server, database, and authentication method (e.g., ActiveDirectoryInteractive, ServicePrincipal) should be provided. For sensitive credentials, always use environment variables. After configuration, you can run `dbt debug --target dev` to test the connection and `dbt run` to execute your models.

import os # Example profiles.yml content for dbt-fabric profiles_yaml_content = f''' fabric: target: dev outputs: dev: type: fabric method: odbc driver: "{{ODBC Driver 18 for SQL Server}}" # Ensure this driver is installed server: "{os.environ.get('DBT_FABRIC_SERVER', 'your_workspace_name.datawarehouse.fabric.microsoft.com')}" port: 1433 database: "{os.environ.get('DBT_FABRIC_DATABASE', 'your_data_warehouse_name')}" schema: "{{{{ env_var('DBT_FABRIC_SCHEMA', 'dbt_schema') }}}}" authentication: "ActiveDirectoryInteractive" # Or ServicePrincipal, CLI, ManagedIdentity, etc. client_id: "{os.environ.get('FABRIC_CLIENT_ID', '')}" # Required for ServicePrincipal client_secret: "{os.environ.get('FABRIC_CLIENT_SECRET', '')}" # Required for ServicePrincipal tenant_id: "{os.environ.get('FABRIC_TENANT_ID', '')}" # Required for ServicePrincipal host_name_in_certificate: "*.datawarehouse.fabric.microsoft.com" # Recommended query_timeout: 300 ''' # In a real scenario, this content would be saved to ~/.dbt/profiles.yml # or a file referenced by DBT_PROFILES_DIR. Then you would run dbt commands: # dbt debug --target dev # dbt run print("Generated profiles.yml content (replace placeholders and ensure ODBC driver is installed):\n") print(profiles_yaml_content) print("\nTo use: Save this to your profiles.yml and run 'dbt debug --target dev' or 'dbt run' from your dbt project directory.")
dbt --version
Debug
Known issues
breakingThe `generate_custom_schema` macro was removed in dbt-fabric v1.9.3. Projects relying on this macro for custom schema generation will encounter errors.
fix
Re-implement any custom schema generation logic directly within your dbt project's macros or adjust your schema configuration to use standard dbt functionalities.
affects: >=1.9.3
gotchaEphemeral models with nested Common Table Expressions (CTEs) are not fully supported when materialized as views, due to limitations within Microsoft Fabric Synapse Data Warehouse.
fix
If encountering issues, consider refactoring your ephemeral models to avoid nested CTEs, or materialize them as tables instead of views if possible within your project's constraints. Simplify complex logic or break down into multiple models.
affects: >=1.9.1 (inherent platform limitation)
gotchaThere have been multiple changes and reversions related to nested CTE support (e.g., in v1.9.4, changes were reverted). This indicates ongoing instability or limitations with complex CTE structures within Fabric through the adapter.
fix
Exercise caution when using complex or deeply nested CTEs, especially with ephemeral models. Test thoroughly and simplify query logic where possible. Refer to the latest dbt-fabric documentation and GitHub issues for updates on CTE support.
affects: All versions
Upgrade
Version history
1.11.1latest on PyPI · released Aug 20, 2026
Audit
Dependencies
dbt-commonrequiredCore dbt utilities and shared components.
dbt-adaptersrequiredBase classes and interfaces for dbt adapters.
dbt-corerequiredThe core dbt framework.
pyodbcrequiredODBC driver for connecting to SQL-based data sources.
msalrequiredMicrosoft Authentication Library for Python, used for Active Directory authentication.
azure-identityrequiredAzure Identity client library for authentication against Azure services.
Agent activity
25 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
dbt-fabric — pip install dbt-fabric · libregistry