Skip to main content

A Microsoft Fabric Spark adapter plugin for dbt

Project description

Adapter Integration Tests
[dbt](https://www.getdbt.com/) 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 Synapse Spark in Microsoft Fabric. For more information, consult the docs.

Getting started

Running locally

Use livy endpoint to connect to Synapse Spark in Microsoft Fabric. The binaries required to setup local environment is not possiblw with Synapse Spark in Microsoft Fabric. However, you can configure profile to connect via livy endpoints.

Create a profile like this one:

fabric-spark-test:
  target: fabricspark-dev
  outputs:
    fabricspark-dev:
        authentication: CLI
        method: livy
        connect_retries: 0
        connect_timeout: 10
        endpoint: https://api.fabric.microsoft.com/v1
        workspaceid: bab084ca-748d-438e-94ad-405428bd5694
        lakehouseid: ccb45a7d-60fc-447b-b1d3-713e05f55e9a
        lakehouse: test
        schema: test
        threads: 1
        type: fabricspark
        retry_all: true

Session Reuse

By default, the adapter reuses Livy sessions across dbt runs to avoid the overhead of creating new sessions each time. Session IDs are persisted to a file so they can be reused in subsequent runs.

Configuration options:

  • session_id_file (optional): Path to the file storing the Livy session ID. Defaults to ./livy-session-id.txt in the current working directory.

Example with custom session file:

fabric-spark-test:
  target: fabricspark-dev
  outputs:
    fabricspark-dev:
        # ... other settings ...
        session_id_file: /path/to/my-session-id.txt

Session reuse behavior:

  1. On first run: Creates a new Livy session and saves the session ID to the file
  2. On subsequent runs: Reads the session ID from file and attempts to reuse it
  3. If the session is invalid (dead, stopped, or doesn't exist): Creates a new session and updates the file
  4. Sessions are intentionally kept alive after dbt exits for reuse

To force a new session, simply delete the session ID file before running dbt.

Reporting bugs and contributing code

  • Want to report a bug or request a feature? Let us know on Slack, or open an issue.

Code of Conduct

Everyone interacting in the Microsoft project's codebases, issue trackers, and mailing lists is expected to follow the PyPA Code of Conduct.

Join the dbt Community

Reporting bugs and contributing code

Code of Conduct

Everyone interacting in the dbt project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the dbt Code of Conduct.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_fabricspark-1.9.3.tar.gz (210.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_fabricspark-1.9.3-py3-none-any.whl (63.2 kB view details)

Uploaded Python 3

File details

Details for the file dbt_fabricspark-1.9.3.tar.gz.

File metadata

  • Download URL: dbt_fabricspark-1.9.3.tar.gz
  • Upload date:
  • Size: 210.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbt_fabricspark-1.9.3.tar.gz
Algorithm Hash digest
SHA256 fe89ba4eb82db104f7bdea7dc3a7c0960f7c03d92af050ce740a5f20cae564e0
MD5 6d51facd5b31edc8c2e9094cb0020b57
BLAKE2b-256 b7975c88f577448b62a1c704ff45176e770b9a7c69467e25786063039be880bf

See more details on using hashes here.

File details

Details for the file dbt_fabricspark-1.9.3-py3-none-any.whl.

File metadata

  • Download URL: dbt_fabricspark-1.9.3-py3-none-any.whl
  • Upload date:
  • Size: 63.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbt_fabricspark-1.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1297c7ea69078c8a60c2cd4a8ad4b8ef127d4a36dbaac7b18e1f03235036a12c
MD5 1af7b50c6227e590a507a44b6db56e4b
BLAKE2b-256 e942f8f60190625d60ed1f57fb7068887a0f62add167c549cc0cec7964fc49b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page