airflow.providers.openlineage.token_provider¶
Attributes¶
Exceptions¶
Raised when OpenLineage API key auth cannot be resolved from an Airflow connection. |
|
Raised when OpenLineage config cannot be resolved from an Airflow connection. |
Classes¶
Resolve OpenLineage client configuration from an Airflow connection. |
|
Resolve an OpenLineage API key from an Airflow connection. |
Functions¶
|
Read the API key from an Airflow connection and put it into the OpenLineage config. |
Module Contents¶
- airflow.providers.openlineage.token_provider.AIRFLOW_CONNECTION_API_KEY_AUTH_TYPE = 'airflow_connection_api_key'[source]¶
- exception airflow.providers.openlineage.token_provider.OpenLineageAirflowConnectionAuthError[source]¶
Bases:
airflow.providers.common.compat.sdk.AirflowExceptionRaised when OpenLineage API key auth cannot be resolved from an Airflow connection.
- exception airflow.providers.openlineage.token_provider.OpenLineageAirflowConnectionConfigError[source]¶
Bases:
airflow.providers.common.compat.sdk.AirflowExceptionRaised when OpenLineage config cannot be resolved from an Airflow connection.
- class airflow.providers.openlineage.token_provider.AirflowConnectionConfigProvider(conn_id)[source]¶
Resolve OpenLineage client configuration from an Airflow connection.
The connection extra contains the full OpenLineage client config, for example
{"transport": {"type": "console"}}.
- class airflow.providers.openlineage.token_provider.AirflowConnectionTokenProvider(config, default_conn_id=None)[source]¶
Resolve an OpenLineage API key from an Airflow connection.
The connection password is preferred. If it is empty and
extra_keyis configured, that key is read from connectionextra. Otherwise, common extra keys are checked.
- airflow.providers.openlineage.token_provider.resolve_airflow_connection_auth(config, config_conn_id=None)[source]¶
Read the API key from an Airflow connection and put it into the OpenLineage config.
OpenLineage config can contain one transport, a composite transport, or composite transports nested inside each other. This function walks through that structure and updates every matching
authblock in place.This only makes sense for HTTP transports:
airflow_connection_api_keyis replaced with{"type": "api_key", "apiKey": ...}.