Skip to main content

OpenLineage integration with dbt

Project description

OpenLineage dbt integration

Wrapper script for automatic metadata collection from dbt

Features

Metadata

  • Model run lifecycle
  • Model inputs / outputs

Requirements

Right now, openlineage-dbt supports only these dbt adapters:

  • bigquery
  • snowflake
  • spark (thrift and odbc, but not local)
  • redshift
  • athena
  • glue
  • postgres
  • clickhouse
  • trino
  • databricks
  • sqlserver
  • dremio
  • duckdb

Installation

$ pip3 install openlineage-dbt

To install from source, run:

$ pip install .

Configuration

Transport

openlineage-dbt uses the OpenLineage Python client to push data to the OpenLineage backend, so any way of configuring Python client will work here as well:

OPENLINEAGE_URL=http://localhost:5000
OPENLINEAGE_API_KEY=abc

dbt integration-specific environment variables:

  • OPENLINEAGE_NAMESPACE - set if you are using something other than the default namespace for job namespace.

Logging

In addition to conventional logging approaches, the OpenLineage dbt wrapper script provides an alternative way of configuring its logging behavior. By setting the OPENLINEAGE_DBT_LOGGING environment variable, you can establish the logging level for the openlineage.dbt and its child modules.

You can also set log level of dbtol Python module but this is deprecated.

Usage

To begin collecting dbt metadata with OpenLineage, replace dbt run with dbt-ol run.

Additional table and column level metadata will be available if catalog.json, a result of running dbt docs generate, will be found in the target directory.

If you need to send events without running the job you can use the command dbt-ol send-events, it will send the metadata of your last run without running the job.


SPDX-License-Identifier: Apache-2.0
Copyright 2018-2025 contributors to the OpenLineage project

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

openlineage_dbt-1.35.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

openlineage_dbt-1.35.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file openlineage_dbt-1.35.0.tar.gz.

File metadata

  • Download URL: openlineage_dbt-1.35.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for openlineage_dbt-1.35.0.tar.gz
Algorithm Hash digest
SHA256 bb743c6d9b0263d8d0a27a7c209de1bbf06a95a804560bcecfcb6bf8a9e5c8e1
MD5 0710c36cac8bcb05a09ada47ba3982e5
BLAKE2b-256 aafbc32b5cef257223fd7a3195ebce16469c6583db76fa9d20e6063d0c6ce4be

See more details on using hashes here.

File details

Details for the file openlineage_dbt-1.35.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openlineage_dbt-1.35.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df53ee60d125e0a85589de1cac4e2cbad7670cd90328bf46d2c12121625f76fb
MD5 a756a1df35354dce9afdcaf93e025db5
BLAKE2b-256 8df175a68eb70c1e30fc7a7837043d165f7fd2eca07733203f1e4ed49966d1b6

See more details on using hashes here.

Supported by

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