airflow.providers.microsoft.mssql.hooks.mssql
¶
Microsoft SQLServer hook module.
Module Contents¶
Classes¶
Interact with Microsoft SQL Server. |
- class airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook(*args, sqlalchemy_scheme=None, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.hooks.sql.DbApiHook
Interact with Microsoft SQL Server.
- Parameters
args – passed to DBApiHook
sqlalchemy_scheme (str | None) – Scheme sqlalchemy connection. Default is
mssql+pymssql
Only used forget_sqlalchemy_engine
andget_sqlalchemy_connection
methods.kwargs – passed to DbApiHook
- property connection_extra_lower: dict[source]¶
connection.extra_dejson
but where keys are converted to lower case.This is used internally for case-insensitive access of mssql params.
- property sqlalchemy_scheme: str[source]¶
Sqlalchemy scheme either from constructor, connection extras or default.
- connection()[source]¶
Get the airflow connection object.
- Returns
The connection object.
- Return type
airflow.models.Connection
- get_sqlalchemy_connection(connect_kwargs=None, engine_kwargs=None)[source]¶
Sqlalchemy connection object.
- get_autocommit(conn)[source]¶
Get autocommit setting for the provided connection.
- Parameters
conn (pymssql.Connection) – Connection to get autocommit setting from.
- Returns
connection autocommit setting. True if
autocommit
is set to True on the connection. False if it is either not set, set to False, or the connection does not support auto-commit.