airflow.providers.jdbc.hooks.jdbc
¶
Module Contents¶
Classes¶
General hook for jdbc db access. |
- class airflow.providers.jdbc.hooks.jdbc.JdbcHook(*args, schema=None, log_sql=True, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.hooks.sql.DbApiHook
General hook for jdbc db access.
JDBC URL, username and password will be taken from the predefined connection. Note that the whole JDBC URL must be specified in the “host” field in the DB. Raises an airflow error if the given connection id doesn’t exist.
- set_autocommit(conn, autocommit)[source]¶
Enable or disable autocommit for the given connection.
- Parameters
conn (jaydebeapi.Connection) – The connection.
autocommit (bool) – The connection’s autocommit setting.