Data Observability platform Help

dbt setup

dbt (data build tool) integration allows you to import metadata, lineage, and test results from your dbt projects into SelectZero.

Two configuration modes are supported:

  • Cloud - connects to dbt Cloud via the Discovery and Admin APIs

  • Artifacts - reads dbt artifacts (manifest.json, run_results.json, catalog.json) from an S3-compatible bucket

Adding a dbt project

Navigate to Settings → dbt and click "Add project".

Cloud mode

Cloud mode connects to dbt Cloud using the Admin API (for project/environment discovery) and the Discovery API (for manifest, catalog, and run results).

Prerequisites

  • A dbt Cloud account with at least one project and environment

  • A dbt Cloud personal access token or service token with read access

Creating an API token

  1. Log in to dbt Cloud

  2. Navigate to Account Settings → API tokens

  3. Create a Service token with at least the following permissions:

    • Metadata Only - required for the Discovery API

    • Read-only - required for project and environment listing

  4. Copy the generated token

Configuration

DBT cloud configuration
  1. Enter a Name for the project

  2. Select Cloud as the config type

  3. Fill in your Account ID - found in the dbt Cloud console (Account settings → Account)

    DBT account Id

  4. Enter the API Token from the previous step

  5. Set Access URL

    DBT Base url

  6. Click "Load Projects" to validate credentials and load available projects

  7. Select a Project from the dropdown

  8. Select an Environment - production environments are auto-selected when available

  9. Set a Discovery URL

    DBT discovery url

  10. Click "Save"

Artifacts mode

Artifacts mode reads dbt artifacts directly from an S3-compatible object storage bucket. This is useful for self-hosted dbt Core setups where artifacts are uploaded to S3 after each run.

Expected bucket structure

s3://your-bucket/path/to/artifacts/ run-2024-01-01/ manifest.json run_results.json catalog.json (optional) run-2024-01-02/ manifest.json run_results.json catalog.json (optional)

Each run folder should contain at least manifest.json. The run_results.json and catalog.json files are optional but recommended.

Configuration

DBT core configuration
  1. Enter a Name for the project

  2. Select Artifacts as the config type

  3. Set the Artifact URL - S3 path to your artifacts folder (e.g. s3://bucket-name/path/to/artifacts)

  4. Enter Access Key and Secret Key for S3 authentication

  5. Optionally set Region (defaults to us-east-1)

  6. Optionally set a custom Endpoint for S3-compatible storage (e.g. MinIO)

  7. Click "Save"

Syncing

After a project is configured, click "Sync Now" to trigger a sync. The sync process:

  1. Fetches artifacts - retrieves manifest, run results, and catalog from the configured source

  2. Imports metadata - creates enrichment objects for dbt models, sources, seeds, and snapshots

  3. Resolves warehouse connections - matches dbt models to existing SelectZero database connections by database name

  4. Builds lineage - creates column-level lineage relations between dependent models using passthrough matching

  5. Imports test results - stores dbt test run results with status, execution time, and compiled SQL

  6. Imports test cases - dbt tests are registered as SelectZero test cases with their source set to DBT, so they appear alongside native test cases in the Test cases library

Real-time sync via webhooks

Instead of waiting for the next scheduled sync, each dbt project exposes a webhook endpoint that an external system can call to trigger an immediate incremental sync. The project details panel shows the Webhook URL for the project (with a copy button) and a key icon for managing the webhook secret. Both Cloud and Artifacts projects support this, but they use the secret in opposite directions.

Cloud projects

For Cloud projects the webhook is driven by dbt Cloud: dbt Cloud signs each delivery with a shared secret and SelectZero verifies the signature before parsing the payload.

  1. In dbt Cloud, go to Account Settings → Webhooks → Create New Webhook

  2. Select the Run completed event for the project/environment SelectZero is synced to

  3. Set the Endpoint to the Webhook URL shown in the SelectZero project details

  4. Copy the webhook secret dbt Cloud displays after creating the webhook

  5. Back in SelectZero, click the key icon next to the webhook URL, paste the dbt Cloud secret, and click Save

After this, every completed dbt Cloud run triggers an incremental sync that refreshes run results, test outcomes, and test cases without manual intervention. The project status pill switches from "Not generated" to "Configured" once a secret is stored.

Artifacts (Core) projects

For Artifacts projects the direction is reversed: SelectZero issues a secret that the external system (typically a dbt Core orchestrator like Airflow, GitHub Actions, or a Lambda) must present when calling the webhook URL.

  1. In SelectZero, open the dbt project and click the key icon next to the webhook URL

  2. Click Generate secret - SelectZero generates and stores a new bearer token and shows it once for you to copy

  3. In your orchestrator, configure an HTTP step that runs after each dbt invocation and uploads its artifacts. Have it call the Webhook URL with header Authorization: Bearer <secret>

  4. The webhook trigger returns immediately; SelectZero then re-reads the latest run folder from the configured S3 bucket and updates resources, runs, and test cases

The secret is stored as a hashed value and cannot be retrieved later, so make sure to copy it during generation. Click the key icon again and choose Regenerate to rotate it - this immediately invalidates the previous secret.

How metadata works

Objects

Each dbt model, source, seed, and snapshot is imported as an enrichment object. The following metadata is captured:

  • Model name, description, tags, and owner

  • Materialization strategy (table, view, incremental, ephemeral)

  • Raw and compiled SQL

  • Package name, access level, version, and group

Warehouse matching

dbt models reference a database and schema in their configuration. SelectZero matches these references against existing database connections by database name. When a match is found, the dbt model is linked to the corresponding connection, schema, and object - enabling catalog cross-referencing.

Columns

Column metadata is sourced from the dbt manifest (column descriptions, data types, tags, constraints) and enriched with catalog data when available (data types, comments).

How lineage works

dbt lineage is built using passthrough column matching. When a dbt model depends on another model (via depends_on), SelectZero compares the column names of both the source and target tables in the warehouse. Columns with matching names are linked as directed lineage relations.

This approach works well for models that pass columns through without renaming. The compiled SQL of each model is stored as a reference for each lineage relation, allowing users to trace the origin query.

Lineage is created between models where:

  • Both the source and target models are resolved to warehouse connections

  • Both models have metadata synced in SelectZero

  • Matching column names exist in both models

Browsing dbt resources

dbtCatalogObjects.png
Each dbt project has a Resources tab on its detail page (Settings → dbt → click a project), giving a docs-like browser of every artifact imported from the project.

The view is split into two panes:

  • Left pane - a searchable tree grouped by resource type. Type the model/source/seed name into the search box at the top to filter the list. Click a group header to collapse or expand it.

  • Right pane - the selected resource's full metadata.

The following resource types are listed, in this order:

  • Models - dbt models (any materialization)

  • Sources - declared sources backing the project

  • Seeds - CSV seeds

  • Snapshots - snapshot definitions

  • Exposures - declared exposures (dashboards, reports, etc.)

The detail pane for a selected resource shows:

  • Description, materialization, package, owner, tags, and any custom metadata from the manifest

  • Last run timestamp - click to jump to the corresponding run in the Runs tab

  • Test status with a data-quality bar summarizing pass/fail/error counts

  • Link to the matched catalog object (when warehouse resolution succeeded)

  • Raw SQL and compiled SQL, toggleable

Test results

dbt test results are imported and stored as pipeline runs. Each run contains:

  • Run status - overall SUCCESS or FAILED based on individual test outcomes

  • Generated timestamp - when the dbt run was executed

  • Elapsed time - total run duration

  • Individual results - each test/model result with status (pass, fail, error), execution time, failure message, and compiled SQL

Test results can be viewed by clicking on a project and navigating to the Runs tab. Clicking on a specific run shows detailed results with expandable test information.

Up to 50 historical runs are retained per project.

dbt and lineage

When a dbt model is matched to a SelectZero catalog object, that object is marked as dbt-enriched. In the Lineage graph, dbt-enriched nodes display a small dbt badge in the upper-right corner of the object (and column-level) tile. Clicking the badge opens the Resources browser with the matching dbt resource pre-selected, so you can review the model's SQL, tests, and metadata without leaving the lineage view.

The badge is only shown when the node has an active dbt enrichment - disabled or removed projects no longer mark their objects.

20 May 2026