airflow.models.connection
¶
Module Contents¶
Classes¶
Placeholder to store information about different database instances connection information. |
Functions¶
|
Do not use, this method is deprecated. |
Attributes¶
- airflow.models.connection.parse_netloc_to_hostname(*args, **kwargs)[source]¶
Do not use, this method is deprecated.
- class airflow.models.connection.Connection(conn_id=None, conn_type=None, description=None, host=None, login=None, password=None, schema=None, port=None, extra=None, uri=None)[source]¶
Bases:
airflow.models.base.Base
,airflow.utils.log.logging_mixin.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.
See also
For more information on how to use this class, see: Managing Connections
- Parameters
conn_id (str | None) – The connection ID.
conn_type (str | None) – The connection type.
description (str | None) – The connection description.
host (str | None) – The host.
login (str | None) – The login.
password (str | None) – The password.
schema (str | None) – The schema.
port (int | None) – The port number.
extra (str | dict | None) – Extra metadata. Non-standard data such as private/SSH keys can be saved here. JSON encoded object.
uri (str | None) – URI address describing connection parameters.
- property password[source]¶
Password. The value is decrypted/encrypted when reading/setting the value.
- property extra[source]¶
Extra data. The value is decrypted/encrypted when reading/setting the value.
- log_info()[source]¶
Read each field individually or use the default representation (__repr__).
This method is deprecated.
- debug_info()[source]¶
Read each field individually or use the default representation (__repr__).
This method is deprecated.