airflow.providers.microsoft.mssql.hooks.mssql

Microsoft SQLServer hook module

Module Contents

Classes

MsSqlHook

Interact with Microsoft SQL Server.

class airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook(*args, **kwargs)[source]

Bases: airflow.hooks.dbapi.DbApiHook

Interact with Microsoft SQL Server.

conn_name_attr = mssql_conn_id[source]
default_conn_name = mssql_default[source]
conn_type = mssql[source]
hook_name = Microsoft SQL Server[source]
supports_autocommit = True[source]
get_conn(self)[source]

Returns a mssql connection object

set_autocommit(self, conn, autocommit)[source]

Sets the autocommit flag on the connection

get_autocommit(self, conn)[source]

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.

Parameters

conn (pymssql.connect) -- Connection to get autocommit setting from.

Returns

connection autocommit setting.

Return type

bool

Was this entry helpful?