| :py:mod:`airflow.providers.jdbc.hooks.jdbc` |
| =========================================== |
| |
| .. py:module:: airflow.providers.jdbc.hooks.jdbc |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.jdbc.hooks.jdbc.JdbcHook |
| |
| |
| |
| |
| .. py:class:: JdbcHook(*args, schema = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.hooks.dbapi.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. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = jdbc_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = jdbc_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = jdbc |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = JDBC Connection |
| |
| |
| |
| .. py:attribute:: supports_autocommit |
| :annotation: = True |
| |
| |
| |
| .. py:method:: get_connection_form_widgets() |
| :staticmethod: |
| |
| Returns connection widgets to add to connection form |
| |
| |
| .. py:method:: get_ui_field_behaviour() |
| :staticmethod: |
| |
| Returns custom field behaviour |
| |
| |
| .. py:method:: get_conn(self) |
| |
| Returns a connection object |
| |
| |
| .. py:method:: set_autocommit(self, conn, autocommit) |
| |
| Enable or disable autocommit for the given connection. |
| |
| :param conn: The connection. |
| :param autocommit: The connection's autocommit setting. |
| |
| |
| .. py:method:: get_autocommit(self, conn) |
| |
| Get autocommit setting for the provided connection. |
| Return True if conn.autocommit is set to True. |
| Return False if conn.autocommit is not set or set to False |
| |
| :param conn: The connection. |
| :return: connection autocommit setting. |
| :rtype: bool |
| |
| |
| |