airflow.secrets.metastore

Objects relating to sourcing connections from metastore database.

Module Contents

Classes

MetastoreBackend

Retrieves Connection object and Variable from airflow metastore database.

class airflow.secrets.metastore.MetastoreBackend[source]

Bases: airflow.secrets.BaseSecretsBackend

Retrieves Connection object and Variable from airflow metastore database.

get_connection(conn_id, session=NEW_SESSION)[source]

Get Airflow Connection from Metadata DB.

Parameters
Returns

Connection Object

Return type

airflow.models.Connection | None

get_variable(key, session=NEW_SESSION)[source]

Get Airflow Variable from Metadata DB.

Parameters
Returns

Variable Value

Return type

str | None

Was this entry helpful?