airflow.providers.microsoft.mssql.operators.mssql¶
Module Contents¶
-
class
airflow.providers.microsoft.mssql.operators.mssql.MsSqlOperator(*, sql: str, mssql_conn_id: str = 'mssql_default', parameters: Optional[Union[Mapping, Iterable]] = None, autocommit: bool = False, database: Optional[str] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperatorExecutes sql code in a specific Microsoft SQL database
This operator may use one of two hooks, depending on the
conn_typeof the connection.If conn_type is
'odbc', thenOdbcHookis used. Otherwise,MsSqlHookis used.- Parameters
sql (str or string pointing to a template file with .sql extension. (templated)) -- the sql code to be executed
mssql_conn_id (str) -- reference to a specific mssql database
parameters (dict or iterable) -- (optional) the parameters to render the SQL query with.
autocommit (bool) -- if True, each command is automatically committed. (default value: False)
database (str) -- name of database which overwrite defined one in connection