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 eventsOPENLINEAGE_API_KEY
- set if consumer of OpenLineage events requiresBearer
authentication keyOPENLINEAGE_NAMESPACE
- set if you are using something other than thedefault
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-2024 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
Built Distribution
Hashes for openlineage_dbt-1.23.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f935c2fdd3ea975bf524f3227ad97715aef22e484d48e800d45ecad7e633b410 |
|
MD5 | e6d78b527e8898264368ac2898d691c1 |
|
BLAKE2b-256 | 4a52052cfc7df1693f683b907010873727b2453b0c6c7222b7731b8283a0d027 |