airflow.providers.openlineage.utils.utils
¶
Module Contents¶
Classes¶
Airflow objects might not be json-encodable overall. |
|
Defines encoding DAG object to JSON. |
|
Defines encoding DagRun object to JSON. |
|
Defines encoding TaskInstance object to JSON. |
|
Defines encoding BaseOperator/AbstractOperator object to JSON. |
|
Defines encoding TaskGroup object to JSON. |
|
This class redacts sensitive data similar to SecretsMasker in Airflow logs. |
Functions¶
|
|
|
|
|
|
|
|
|
Return the connection URI for the given Connection. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes¶
- airflow.providers.openlineage.utils.utils.redacted_connection_uri(conn, filtered_params=None, filtered_prefixes=None)[source]¶
Return the connection URI for the given Connection.
This method additionally filters URI by removing query parameters that are known to carry sensitive data like username, password, access key.
- class airflow.providers.openlineage.utils.utils.InfoJsonEncodable(obj)[source]¶
Bases:
dict
Airflow objects might not be json-encodable overall.
The class provides additional attributes to control what and how is encoded:
renames: a dictionary of attribute name changes
- casts: a dictionary consisting of attribute namesand corresponding methods that should changeobject value
includes: list of attributes to be included in encoding
excludes: list of attributes to be excluded from encoding
Don’t use both includes and excludes.
- class airflow.providers.openlineage.utils.utils.DagInfo(obj)[source]¶
Bases:
InfoJsonEncodable
Defines encoding DAG object to JSON.
- class airflow.providers.openlineage.utils.utils.DagRunInfo(obj)[source]¶
Bases:
InfoJsonEncodable
Defines encoding DagRun object to JSON.
- class airflow.providers.openlineage.utils.utils.TaskInstanceInfo(obj)[source]¶
Bases:
InfoJsonEncodable
Defines encoding TaskInstance object to JSON.
- class airflow.providers.openlineage.utils.utils.TaskInfo(obj)[source]¶
Bases:
InfoJsonEncodable
Defines encoding BaseOperator/AbstractOperator object to JSON.
- class airflow.providers.openlineage.utils.utils.TaskGroupInfo(obj)[source]¶
Bases:
InfoJsonEncodable
Defines encoding TaskGroup object to JSON.
- airflow.providers.openlineage.utils.utils.get_airflow_run_facet(dag_run, dag, task_instance, task, task_uuid)[source]¶
- class airflow.providers.openlineage.utils.utils.OpenLineageRedactor[source]¶
Bases:
airflow.utils.log.secrets_masker.SecretsMasker
This class redacts sensitive data similar to SecretsMasker in Airflow logs.
The difference is that our default max recursion depth is way higher - due to the structure of OL events we need more depth. Additionally, we allow data structures to specify data that needs not to be redacted by specifying _skip_redact list by deriving RedactMixin.