The `openlineage-airflow` library provides an integration for Apache Airflow to emit lineage metadata to an OpenLineage backend. It captures information about DAGs, tasks, and data interactions, contributing to a comprehensive data lineage graph. The latest version is 1.45.0, and new versions are released frequently, often bi-weekly, aligning with the broader OpenLineage project.
pip install openlineage-airflowVerified import paths — ran on the pinned version, not inferred.
This quickstart defines a basic Airflow DAG. The `openlineage-airflow` plugin, once installed and configured with `OPENLINEAGE_URL` and optionally `OPENLINEAGE_API_KEY` in the Airflow environment, will automatically capture and emit lineage events for this DAG's runs and tasks. No explicit OpenLineage imports are needed within the DAG file for basic functionality.
Upgrade to `openlineage-airflow==1.40.1` or any newer version to restore access to the `__version__` attribute.
Ensure your Apache Airflow environment is running version 2.0.0 or later (e.g., `pip install apache-airflow>=2.0.0`). Python 3.9+ is also required.
Set `OPENLINEAGE_URL` (e.g., `http://localhost:5000`) and `OPENLINEAGE_API_KEY` (if authentication is enabled on your backend) in your Airflow worker/scheduler environment, or configure them in the `[openlineage]` section of your `airflow.cfg`.
No fix needed, this is intended behavior. The plugin automatically instruments supported operators. For custom event emission or advanced use cases, the `OpenLineageClient` can be imported and used within DAGs or custom operators.