Metadata-Version: 2.3
Name: openlineage-dbt
Version: 1.47.0
Summary: OpenLineage integration with dbt
Keywords: openlineage
Author: OpenLineage
Requires-Dist: tqdm>=4.62.0
Requires-Dist: openlineage-integration-common==1.47.0
Requires-Dist: dbt-core>=1.0.0
Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: pytest-xdist>=2.5.0 ; extra == 'dev'
Requires-Dist: mock ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Requires-Dist: mypy>=0.9.6 ; extra == 'dev'
Requires-Dist: python-dateutil ; extra == 'dev'
Requires-Dist: requests>=2.25.0 ; extra == 'dev'
Requires-Dist: docker>=6.0.0 ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Python: >=3.10
Provides-Extra: dev
Description-Content-Type: text/markdown

# OpenLineage dbt integration

Wrapper script for automatic metadata collection from dbt

## Features

**Metadata**

* Model run lifecycle
* Model inputs / outputs

## Requirements

- [Python >= 3.8](https://www.python.org/downloads)
- [dbt >= 0.20](https://www.getdbt.com/)

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`
* `fabric` (Microsoft Fabric Warehouse)
* `dremio`
* `duckdb`

## Installation

```bash
$ pip3 install openlineage-dbt
```

To install from source, run:

```bash
$ 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:

```ini
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.

## Development

For development setup instructions, see the [Python development setup guide](https://openlineage.io/docs/client/python/development/setup).

Quick start:
```bash
# From the repository root
$ make setup-dbt

# Or manually
$ cd integration/dbt
$ uv sync --extra dev
```

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