| :py:mod:`airflow.providers.microsoft.mssql.hooks.mssql` |
| ======================================================= |
| |
| .. py:module:: airflow.providers.microsoft.mssql.hooks.mssql |
| |
| .. autoapi-nested-parse:: |
| |
| Microsoft SQLServer hook module |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook |
| |
| |
| |
| |
| .. py:class:: MsSqlHook(*args, sqlalchemy_scheme = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.providers.common.sql.hooks.sql.DbApiHook` |
| |
| Interact with Microsoft SQL Server. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = mssql_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = mssql_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = mssql |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Microsoft SQL Server |
| |
| |
| |
| .. py:attribute:: supports_autocommit |
| :annotation: = True |
| |
| |
| |
| .. py:attribute:: DEFAULT_SQLALCHEMY_SCHEME |
| :annotation: = mssql+pymssql |
| |
| |
| |
| .. py:method:: connection_extra_lower() |
| :property: |
| |
| ``connection.extra_dejson`` but where keys are converted to lower case. |
| This is used internally for case-insensitive access of mssql params. |
| |
| |
| .. py:method:: sqlalchemy_scheme() |
| :property: |
| |
| Sqlalchemy scheme either from constructor, connection extras or default. |
| |
| |
| .. py:method:: get_uri() |
| |
| Extract the URI from the connection. |
| |
| :return: the extracted uri. |
| |
| |
| .. py:method:: get_sqlalchemy_connection(connect_kwargs = None, engine_kwargs = None) |
| |
| Sqlalchemy connection object |
| |
| |
| .. py:method:: get_conn() |
| |
| Returns a mssql connection object |
| |
| |
| .. py:method:: set_autocommit(conn, autocommit) |
| |
| Sets the autocommit flag on the connection |
| |
| |
| .. py:method:: get_autocommit(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 or conn |
| does not support autocommit. |
| |
| :param conn: Connection to get autocommit setting from. |
| :return: connection autocommit setting. |
| :rtype: bool |
| |
| |
| |