airflow.models.connection¶
Module Contents¶
- 
airflow.models.connection.parse_netloc_to_hostname(*args, **kwargs)[source]¶
- 
This method is deprecated.
- 
class airflow.models.connection.Connection(conn_id: Optional[str] = None, conn_type: Optional[str] = None, description: Optional[str] = None, host: Optional[str] = None, login: Optional[str] = None, password: Optional[str] = None, schema: Optional[str] = None, port: Optional[int] = None, extra: Optional[Union[str, dict]] = None, uri: Optional[str] = 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) -- The connection ID. 
- conn_type (str) -- The connection type. 
- description (str) -- The connection description. 
- host (str) -- The host. 
- login (str) -- The login. 
- password (str) -- The password. 
- schema (str) -- The schema. 
- port (int) -- The port number. 
- extra (str) -- Extra metadata. Non-standard data such as private/SSH keys can be saved here. JSON encoded object. 
- uri (str) -- URI address describing connection parameters. 
 
 - 
parse_from_uri(self, **uri)[source]¶
- This method is deprecated. Please use uri parameter in constructor. 
 - 
log_info(self)[source]¶
- This method is deprecated. You can read each field individually or use the default representation (__repr__). 
 - 
debug_info(self)[source]¶
- This method is deprecated. You can read each field individually or use the default representation (__repr__).