airflow.providers.ibm.db2.hooks.db2¶
This module allows to connect to an IBM Db2 database.
Classes¶
Interact with IBM Db2. |
Module Contents¶
- class airflow.providers.ibm.db2.hooks.db2.Db2Hook(*args, schema=None, log_sql=True, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.hooks.sql.DbApiHookInteract with IBM Db2.
You can specify SSL and other connection parameters in the extra field of your connection.
SSL Configuration: -
{"SECURITY": "SSL", "SSLServerCertificate": "/path/to/cert.crt"}- For SSL with server certificate -{"SECURITY": "SSL"}- For SSL without certificate validationOther Parameters: Any additional Db2 connection string parameters can be added to the extra field. Parameter names will be automatically converted to uppercase.
- Parameters:
db2_conn_id – The Db2 connection id reference to a specific Db2 database.
- property dialect: airflow.providers.ibm.db2.dialects.db2.Db2Dialect[source]¶
- get_conn()[source]¶
Return
ibm_db_dbiconnection object.- Returns:
Db2 connection object
- Return type:
Any
- get_uri()[source]¶
Return connection URI for SQLAlchemy using the
ibm-db-sadialect.Includes extra connection parameters (like SSL configuration) as query parameters.
- Returns:
SQLAlchemy connection URI
- Return type: