Install & Compatibility
Where this runs
tested against v1.49.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
build_error
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 11.6s · import 0.000s · 126MB
129MB installed
● package 129MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
__version__
✓ from openlineage_dbt import __version__
This library primarily integrates via dbt CLI commands and `profiles.yml` configuration, rather than direct Python imports for end-user applications. This import is provided as a technical placeholder from the package root.
To quickly integrate `openlineage-dbt`, you need to install the package along with your specific dbt adapter (e.g., `dbt-snowflake`). Then, configure your `profiles.yml` to use `type: openlineage` and specify the `adapter` it should wrap. Finally, set the `OPENLINEAGE_URL` and `OPENLINEAGE_API_KEY` (if required) environment variables or pass them as CLI arguments when running dbt commands. Lineage events will be sent to the configured OpenLineage backend.
# 1. Install openlineage-dbt and your target dbt adapter (e.g., dbt-snowflake)
# pip install openlineage-dbt dbt-snowflake
# 2. Configure your dbt profiles.yml
# (e.g., ~/.dbt/profiles.yml)
# Add an OpenLineage profile that wraps your actual adapter:
# my_openlineage_profile:
# target: dev
# outputs:
# dev:
# type: openlineage
# adapter: snowflake # The actual dbt adapter you are using
# account: <your_snowflake_account>
# user: <your_snowflake_user>
# password: <your_snowflake_password>
# role: <your_snowflake_role>
# warehouse: <your_snowflake_warehouse>
# database: <your_snowflake_database>
# schema: <your_snowflake_schema>
# threads: 1
# 3. Set OpenLineage URL (and optionally API Key) as environment variables
# or pass as CLI arguments.
import os
os.environ['OPENLINEAGE_URL'] = os.environ.get('OPENLINEAGE_URL', 'http://localhost:5000') # Or your Marque URL
os.environ['OPENLINEAGE_API_KEY'] = os.environ.get('OPENLINEAGE_API_KEY', 'your_api_key_if_needed')
# 4. Run dbt with the OpenLineage-enabled profile
# Create a dummy dbt project structure for demonstration
# (assuming you have a dbt project initialized, e.g., 'dbt init my_project')
# For example, create models/example.sql in your dbt project:
# -- models/example.sql
# -- {{ config(materialized='table') }}
# -- select 1 as id
print(f"Running dbt with OpenLineage at {os.environ['OPENLINEAGE_URL']}...")
# Example dbt command (execute from your dbt project root):
# dbt build --profile my_openlineage_profile --target dev
# Or, to ensure lineage is sent:
# dbt build --profile my_openlineage_profile --target dev \
# --openlineage-url $OPENLINEAGE_URL \
# --openlineage-api-key $OPENLINEAGE_API_KEY
print("Please execute the dbt command from your terminal to see lineage generation.")
print("Example: dbt build --profile my_openlineage_profile --target dev")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'openlineage_dbt'
`openlineage-dbt` is not installed in the current Python environment.
fixRun `pip install openlineage-dbt` to install the package.
dbt encountered an error: The 'adapter' field in your profile is missing or invalid. Received adapter type: openlineage
Your `profiles.yml` configuration for the `openlineage` type is missing the nested `adapter` field, which specifies the actual dbt adapter (e.g., snowflake, bigquery) to wrap.
fixIn your `profiles.yml`, under your `type: openlineage` profile, add `adapter: <your_original_dbt_adapter_type>` (e.g., `adapter: snowflake`) along with the necessary connection details for that adapter.
Error: Could not connect to OpenLineage API at [URL] - Status: [HTTP Status Code]
The `OPENLINEAGE_URL` is incorrect, the OpenLineage backend is unreachable, or the `OPENLINEAGE_API_KEY` (if used) is invalid.
fixVerify the `OPENLINEAGE_URL` environment variable or CLI flag is correct and reachable. Check your OpenLineage backend status. If using an API key, ensure `OPENLINEAGE_API_KEY` is correctly set.
Upgrade
Version history
1.49.0latest on PyPI · released Jun 10, 2026
Audit
Dependencies
dbt-corerequiredRequired for dbt CLI functionality and adapter integration.
openlineage-pythonrequiredUnderlying client for sending OpenLineage events.
dbt-<adapter_name>requiredSpecific dbt adapter (e.g., dbt-snowflake, dbt-bigquery) that openlineage-dbt wraps.