airflow.hooks.jdbc_hook

Module Contents

class airflow.hooks.jdbc_hook.JdbcHook[source]

Bases: airflow.hooks.dbapi_hook.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.

conn_name_attr = jdbc_conn_id[source]
default_conn_name = jdbc_default[source]
supports_autocommit = True[source]
get_conn(self)[source]
set_autocommit(self, conn, autocommit)[source]

Enable or disable autocommit for the given connection.

Parameters

conn – The connection

Returns

Was this entry helpful?