:mod:`airflow.models.connection` ================================ .. py:module:: airflow.models.connection Module Contents --------------- .. function:: parse_netloc_to_hostname(uri_parts) .. py:class:: Connection(conn_id=None, conn_type=None, host=None, login=None, password=None, schema=None, port=None, extra=None, uri=None) Bases::class:`airflow.models.base.Base`, :class:`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. .. attribute:: __tablename__ :annotation: = connection .. attribute:: id .. attribute:: conn_id .. attribute:: conn_type .. attribute:: host .. attribute:: schema .. attribute:: login .. attribute:: _password .. attribute:: port .. attribute:: is_encrypted .. attribute:: is_extra_encrypted .. attribute:: _extra .. attribute:: _types :annotation: = [['docker', 'Docker Registry'], ['fs', 'File (path)'], ['ftp', 'FTP'], ['google_cloud_platform', 'Google Cloud Platform'], ['hdfs', 'HDFS'], ['http', 'HTTP'], ['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']] .. attribute:: password .. attribute:: extra .. attribute:: extra_dejson Returns the extra property by deserializing json. .. method:: parse_from_uri(self, uri) .. method:: get_password(self) .. method:: set_password(self, value) .. method:: get_extra(self) .. method:: set_extra(self, value) .. method:: rotate_fernet_key(self) .. method:: get_hook(self) .. method:: __repr__(self) .. method:: debug_info(self)