odd-dbt

CLI push adapter that ingests dbt test results and model lineage into the ODD Platform.

Status: Stable for the supported targets, narrow scope: Postgres and Snowflake only, generic tests only.

odd-dbt is a push adapter for dbt. It reads dbt's target/ folder after a run, maps test results and model lineage into the ODD specification, and pushes them to the ODD Platform. It functions as a standalone CLI (odd_dbt_test) and is also bundled into odd-cli (the odd dbt subcommand) for users who want a single CLI entry point.

For the broader pull-vs-push picture, start at the Integrations hub.

Supported targets

dbt target
Supported version
Notes

Postgres

dbt-postgres ^1.6

Snowflake

dbt-snowflake ^1.6

The Snowflake account identifier must include the region segment, e.g. hj1234.eu-central-1.

Test type
Supported

Generic tests (built-in + dbt_utils)

Singular tests

✗ — not currently supported

Source: odd-dbt README.

Installation

pip install odd-dbt

Configuration

Three environment variables wire the adapter to the platform:

Variable
Value

ODD_PLATFORM_HOST

Platform URL (e.g. http://localhost:8080).

ODD_PLATFORM_TOKEN

Collector token issued by the platform under Management → Collectors.

DBT_DATA_SOURCE_ODDRN

The dbt data source's ODDRN — e.g. //dbt/host/localhost. Used as the namespace under which dbt entities are registered.

The same values can be passed as flags on every CLI invocation in lieu of environment variables.

CLI commands

Command
Purpose

odd_dbt_test create-datasource --name=<name> --dbt-host=<host>

Registers the dbt project as a data source in the platform. Run once per project.

odd_dbt_test ingest-test --profile=<profile>

Reads dbt's target/run_results.json + target/manifest.json from the current directory and pushes test results.

odd_dbt_test ingest-lineage --profile=<profile>

Reads dbt's manifest.json and pushes model-to-model lineage.

odd_dbt_test test --profile=<profile>

Convenience: runs dbt test, then ingests the produced results.

For invocations from outside the dbt project root, pass --project-dir=<path> and --profiles-dir=<path> explicitly.

For the full flag list: odd_dbt_test --help.

What gets sent

  • dbt models as Data Entity entities under the DBT_DATA_SOURCE_ODDRN namespace.

  • Model-to-model lineage edges derived from manifest.json.

  • Generic test results with status (pass / fail / error / warn) and pointers to the tested column / model.

The platform displays the test results on the affected dataset's detail page and contributes to the Quality Dashboard.

Programmatic usage

The package exposes its mappers (DbtTestMapper, DbtLineageMapper) for direct Python use — useful when you want to wire the ingestion into a custom orchestration step rather than the CLI. See the repo source for the import paths.

Known limitations

  • Two adapters only. dbt-postgres and dbt-snowflake are supported; other dbt adapters (BigQuery, Redshift, Databricks, Trino, …) are not.

  • Generic tests only. Singular tests (the ones you write as a single SQL query under tests/) are not currently parsed.

  • dbt 1.6+. Earlier dbt versions are not supported.

  • DBT_DATA_SOURCE_ODDRN must be stable. Changing it after first ingest registers the same dbt project as a new data source on the platform side.

  • Snowflake account identifier must include region. The bare account form (e.g. hj1234) does not work — use hj1234.eu-central-1.

Where to next

  • odd-cli — bundles this adapter under odd dbt; useful when you want one CLI for dbt + local files + token management.

  • Quality Dashboard — where dbt test results aggregate alongside other quality signals.

  • Repo — sources, releases, and issues.

Last updated