---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: e3b142a9472bdd95dea03782572de5763a184395c13d96977900eef56b497578
  pageDirectory: concepts
  sources:
    - use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md
  confidence: 1
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - dbt-task-configuration-via-ui-and-api
    - API and dbt Task Configuration via UI
    - DTCVUAA
  citations:
    - file: use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md
    - file: use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md
title: dbt Task Configuration via UI and API
description: Step-by-step configuration of a dbt task in the Databricks Jobs UI and via the Jobs API, including source repo, commands, SQL warehouse, compute, and environment settings.
tags:
  - dbt
  - databricks-jobs
  - configuration
  - api
timestamp: "2026-06-19T23:22:41.213Z"
---

# dbt Task Configuration via UI and API

**dbt Task Configuration via UI and API** describes the methods for setting up and managing dbt Core transformation tasks within [Databricks Jobs](/concepts/dbt-task-in-databricks-jobs.md) on AWS. You can configure dbt tasks through the Databricks UI or programmatically using the Jobs API, enabling automation, monitoring, and integration of dbt projects into broader data workflows. ^[use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md]

## Overview

Running dbt Core projects as job tasks allows you to benefit from [Lakeflow Jobs](/concepts/lakeflow-jobs.md) features, including automated scheduling, monitoring of dbt transformations with notifications, inclusion in workflows with other tasks (such as data ingestion with Auto Loader or analysis with Databricks notebooks), and automatic archiving of artifacts from job runs (logs, results, manifests, and configuration). ^[use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md]

## UI Configuration

To configure a dbt task through the Databricks UI:

1. Navigate to **Jobs & Pipelines** in the sidebar and click **Create**, then **Job**.
2. Click the **dbt** tile (or search for it under **Add another task type**) to configure the first task.
3. Optionally rename the job from its default name.
4. In **Task name**, enter a name for the task.
5. In the **Source** dropdown, choose **Git provider** (you cannot run dbt projects from DBFS; you must use [Databricks Git folders](/concepts/databricks-git-folders-for-cicd.md)).
6. In **Project directory**, enter the Git repository URL (for example, `https://github.com/dbt-labs/jaffle_shop.git`).
7. In the **dbt commands** text boxes, specify the dbt commands to run (e.g., **deps**, **seed**, and **run**). Commands are run in the specified order and must be prefixed with `dbt`.
8. In **SQL warehouse**, select a serverless or pro SQL warehouse to run the SQL generated by dbt.
9. (Optional) Specify a **catalog** and **schema** for the task output; the `default` [Catalog and Schema](/concepts/catalog-and-schema.md) are used by default.
10. (Optional) Under **dbt CLI compute**, choose an existing compute option or create a new job cluster.
11. In **Environment and Libraries**, leave `dbt-default` selected.
12. Click **Create task**.

^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

### Advanced UI: Custom Profiles

For running dbt with a custom profile using a SQL warehouse or all-purpose compute:

1. Create a `profiles.yml` file in your dbt project directory with the following content:
   ```yaml
   jaffle_shop:
     target: databricks_job
     outputs:
       databricks_job:
         type: databricks
         method: http
         schema: '<schema>'
         host: '<http-host>'
         http_path: '<http-path>'
         token: "{{ env_var('DBT_ACCESS_TOKEN') }}"
   ```
2. Replace `<schema>` with a schema name, and provide the **Server Hostname** and **HTTP Path** values from your SQL warehouse or all-purpose compute connection details.
3. Check the file into Git and push it to your repository.
4. In the UI, set **Source** to your forked repository details and **SQL warehouse** to **None (Manual)**.
5. In **Profiles Directory**, enter the relative path to the directory containing `profiles.yml`.

^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

## API Configuration

You can create and manage jobs with dbt tasks using the Jobs API. The following example creates a job with a single dbt task: ^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

```json
{
  "name": "jaffle_shop dbt job",
  "max_concurrent_runs": 1,
  "git_source": {
    "git_url": "https://github.com/dbt-labs/jaffle_shop",
    "git_provider": "gitHub",
    "git_branch": "main",
    "sparse_checkout": {
      "patterns": ["models", "seeds"]
    }
  },
  "job_clusters": [
    {
      "job_cluster_key": "dbt_CLI",
      "new_cluster": {
        "spark_version": "10.4.x-photon-scala2.12",
        "node_type_id": "i3.xlarge",
        "num_workers": 0,
        "spark_conf": {
          "spark.master": "local[*, 4]",
          "spark.databricks.cluster.profile": "singleNode"
        },
        "custom_tags": {
          "ResourceClass": "SingleNode"
        }
      }
    }
  ],
  "tasks": [
    {
      "task_key": "transform",
      "job_cluster_key": "dbt_CLI",
      "dbt_task": {
        "commands": ["dbt deps", "dbt seed", "dbt run"],
        "warehouse_id": "1a234b567c8de912"
      },
      "libraries": [
        {
          "pypi": {
            "package": "dbt-databricks>=1.0.0,<2.0.0"
          }
        }
      ]
    }
  ]
}
```

Key API elements include:
- **git_source**: Specifies the Git repository, provider, branch, and optional sparse checkout patterns.
- **job_clusters**: Defines compute configuration for running dbt CLI.
- **tasks**: Contains the `dbt_task` block with `commands` and `warehouse_id`, along with a `libraries` block specifying the `dbt-databricks` package.

^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

## Viewing Results

After job completion, you can test results by running SQL queries from a Databricks notebook or SQL warehouse. For example: ^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

```sql
SELECT * from <schema>.customers LIMIT 10;
```

## Accessing dbt Task Output

You can retrieve dbt task output programmatically after the run completes. Use the task run ID (not the parent job run ID) to avoid errors, as multi-task jobs require individual task run retrieval. ^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

### Using the Databricks CLI

```bash
databricks jobs get-run-output <task_run_id> --output JSON
```

### Using the Jobs API

```
GET /api/2.0/jobs/runs/get-output?run_id=<task_run_id>
```

## dbt Python Models

For dbt Python models, you must use Databricks compute rather than a SQL warehouse, as Python models require specific data warehouse support. Include dbt tasks as part of broader workflows when using Python models. ^[use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md]

## Related Concepts

- dbt Core
- [Databricks Jobs](/concepts/dbt-task-in-databricks-jobs.md)
- Jobs API
- Auto Loader
- Databricks SQL warehouse
- [Serverless compute](/concepts/serverless-gpu-compute.md)
- [dbt-databricks package](/concepts/dbt-databricks-adapter-package.md)
- [Databricks Git folders](/concepts/databricks-git-folders-for-cicd.md)
- [Lakeflow Jobs](/concepts/lakeflow-jobs.md)

## Sources

- use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md

# Citations

1. [use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws.md](/references/use-dbt-transformations-in-lakeflow-jobs-databricks-on-aws-9420061c.md)
2. use-dbt-transformations-in-lakeflow-jobs-databricks-aws.md
