Configuring Lineage#

Since Cosmos 1.1, it uses internally the openlineage-integration-common to parse artifacts generated with dbt commands and create lineage events. This feature is only available for the local and virtualenv execution methods (read execution modes for more information).

To emit lineage events, Cosmos can use one of the following:

  1. Airflow official OpenLineage provider, or

  2. Additional libraries.

No change to the user DAG files is required to use OpenLineage.


If using Airflow 2.7 or higher, install apache-airflow-providers-openlineage.

Otherwise, install Cosmos using astronomer-cosmos[openlineage].


If using Airflow 2.7, follow the instructions on how to configure OpenLineage.

Otherwise, follow these instructions.


Cosmos will use the Airflow [openlineage] namespace property as a namespace, if available.

Otherwise, it attempts to use the environment variable OPENLINEAGE_NAMESPACE as the namespace.

Finally, if neither are defined, it uses "cosmos" as the namespace.