airflow.models.connection

Module Contents

airflow.models.connection.parse_netloc_to_hostname(uri_parts)[source]
class airflow.models.connection.Connection(conn_id=None, conn_type=None, host=None, login=None, password=None, schema=None, port=None, extra=None, uri=None)[source]

Bases: airflow.models.base.Base, airflow.LoggingMixin

Placeholder to store information about different database instances connection information. The idea here is that scripts use references to database instances (conn_id) instead of hard coding hostname, logins and passwords when using operators or hooks.

__tablename__ = connection[source]
id[source]
conn_id[source]
conn_type[source]
host[source]
schema[source]
login[source]
_password[source]
port[source]
is_encrypted[source]
is_extra_encrypted[source]
_extra[source]
_types = [['docker', 'Docker Registry'], ['fs', 'File (path)'], ['ftp', 'FTP'], ['google_cloud_platform', 'Google Cloud Platform'], ['hdfs', 'HDFS'], ['http', 'HTTP'], ['pig_cli', 'Pig Client Wrapper'], ['hive_cli', 'Hive Client Wrapper'], ['hive_metastore', 'Hive Metastore Thrift'], ['hiveserver2', 'Hive Server 2 Thrift'], ['jdbc', 'Jdbc Connection'], ['jenkins', 'Jenkins'], ['mysql', 'MySQL'], ['postgres', 'Postgres'], ['oracle', 'Oracle'], ['vertica', 'Vertica'], ['presto', 'Presto'], ['s3', 'S3'], ['samba', 'Samba'], ['sqlite', 'Sqlite'], ['ssh', 'SSH'], ['cloudant', 'IBM Cloudant'], ['mssql', 'Microsoft SQL Server'], ['mesos_framework-id', 'Mesos Framework ID'], ['jira', 'JIRA'], ['redis', 'Redis'], ['wasb', 'Azure Blob Storage'], ['databricks', 'Databricks'], ['aws', 'Amazon Web Services'], ['emr', 'Elastic MapReduce'], ['snowflake', 'Snowflake'], ['segment', 'Segment'], ['azure_data_lake', 'Azure Data Lake'], ['azure_container_instances', 'Azure Container Instances'], ['azure_cosmos', 'Azure CosmosDB'], ['cassandra', 'Cassandra'], ['qubole', 'Qubole'], ['mongo', 'MongoDB'], ['gcpcloudsql', 'Google Cloud SQL'], ['grpc', 'GRPC Connection'], ['yandexcloud', 'Yandex Cloud'], ['spark', 'Spark']][source]
password[source]
extra[source]
extra_dejson[source]

Returns the extra property by deserializing json.

parse_from_uri(self, uri)[source]
get_uri(self)[source]
get_password(self)[source]
set_password(self, value)[source]
get_extra(self)[source]
set_extra(self, value)[source]
rotate_fernet_key(self)[source]
get_hook(self)[source]
__repr__(self)[source]
log_info(self)[source]
debug_info(self)[source]

Was this entry helpful?