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 only supports bigquery, snowflake, spark and redshift dbt adapters.

Installation

$ pip3 install openlineage-dbt

To install from source, run:

$ pip install .

Configuration

HTTP Backend Environment Variables

openlineage-dbt uses the OpenLineage client to push data to the OpenLineage backend.

The OpenLineage client depends on environment variables:

  • OPENLINEAGE_URL - point to service which will consume OpenLineage events
  • OPENLINEAGE_API_KEY - set if consumer of OpenLineage events requires Bearer authentication key
  • 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 which 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-2023 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.13.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openlineage_dbt-1.13.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file openlineage-dbt-1.13.1.tar.gz.

File metadata

  • Download URL: openlineage-dbt-1.13.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for openlineage-dbt-1.13.1.tar.gz
Algorithm Hash digest
SHA256 38e7cdba38c7f1b3740f81fc52cddaf58eb8012167d32002137a19e3f7d893ba
MD5 4b84bb435228c0646ff080385c2ca2b4
BLAKE2b-256 80e55eaca98cca69b226762930e090836445ae7dfb24f940060270849f388ddb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openlineage_dbt-1.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31eff4f368cbc6f1889c5723d898f770e06324224937f2189b9d1f41f1fcdc81
MD5 4088cadff0e9f1d77970a52916ca221b
BLAKE2b-256 db91894f0162f0fb613ca84fab7687660887accd87640024e3c7b8de3bdcef1b

See more details on using hashes here.

Supported by

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