Edit

Run dbt projects from a GitHub repository in Microsoft Fabric

If your team already maintains a dbt project in a GitHub repository, you can connect it to a Microsoft Fabric dbt job and run it there. Your dbt project stays in the GitHub repository and Fabric pulls the code and handles execution. You don't need to copy or rewrite anything.

  • GitHub stores your dbt project code.
  • Fabric runs dbt commands and displays the results.

When to use this feature

This feature is a good fit if:

  • You have an existing dbt project in a GitHub repository.
  • You don't want to duplicate dbt code into Fabric.
  • You want Fabric to handle execution and monitoring of dbt runs.

Note

Currently, you can't write or edit dbt models in the Fabric UI. Fabric only supports running dbt commands from a connected GitHub repository.

Prerequisites

Before you start, make sure you have:

  • An existing dbt project stored in a GitHub repository
  • Access to a Microsoft Fabric workspace with permission to create items
  • A classic GitHub personal access token (PAT) with access to the repository

Fabric uses the PAT to securely read your dbt project from GitHub.

Connect and run a GitHub dbt project

To run a dbt project from GitHub in Fabric, follow these steps:

  1. Create a dbt job connected to GitHub
  2. Configure connection settings
  3. Run the dbt job

Create a dbt job connected to GitHub

  1. Open your Fabric workspace.

  2. Select + New item.

  3. Select dbt job.

    Screenshot of the new item menu in Microsoft Fabric with the dbt job option.

    Screenshot of the dbt job naming dialog in Microsoft Fabric.

  4. Select Connect to a GitHub project.

    Screenshot of the menu to Connect to a GitHub project option in Microsoft Fabric.

  5. From the list of available sources, select GitHub - Source Control under the New Sources category.

    Screenshot of the GitHub source control option in Microsoft Fabric.

Configure connection settings

Provide the following details to create a connection between Fabric and GitHub:

  • Repository name or URL - the GitHub repository that contains your dbt project. For example: https://github.com/a/dbtjob_CICD

  • Connection name - a friendly name to identify this connection.

  • Classic PAT - Fabric uses this token to securely access the repository.

    Screenshot of the GitHub connection settings form in Microsoft Fabric.

After you enter the connection details:

  1. Select the branch to use (for example, main). Fabric pulls dbt code from this branch each time the job runs.

    Screenshot of the branch selection dropdown for a dbt project in Microsoft Fabric.

  2. Select the adapter. The adapter determines which data platform dbt runs against.

    Screenshot of the adapter selection dropdown for a dbt project in Microsoft Fabric.

Run the dbt job

  1. Save the dbt job.

  2. Select Run.

    Screenshot of the Run button for a dbt job in Microsoft Fabric.

When the job runs, Fabric:

  • Pulls the dbt project from the selected GitHub branch.
  • Runs the configured dbt commands.
  • Captures logs and execution status in the Fabric UI.

Use the logs to verify the run and troubleshoot any failures.

Known limitations

  • Currently, dbt projects connected through GitHub can't be authored or modified in the Fabric UI. Fabric only supports running dbt commands.