airflow.providers.microsoft.mssql.operators.mssql

Module Contents

Classes

MsSqlOperator

Executes sql code in a specific Microsoft SQL database.

class airflow.providers.microsoft.mssql.operators.mssql.MsSqlOperator(*, mssql_conn_id='mssql_default', database=None, **kwargs)[source]

Bases: airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator

Executes sql code in a specific Microsoft SQL database.

See also

For more information on how to use this operator, take a look at the guide: Connect to MSSQL using SQLExecuteQueryOperator

This operator may use one of two hooks, depending on the conn_type of the connection.

If conn_type is 'odbc', then OdbcHook is used. Otherwise, MsSqlHook is used.

This class is deprecated.

Please use airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator.

Parameters
  • sql – the sql code to be executed (templated)

  • mssql_conn_id (str) – reference to a specific mssql database

  • parameters – (optional) the parameters to render the SQL query with.

  • autocommit – if True, each command is automatically committed. (default value: False)

  • database (str | None) – name of database which overwrite defined one in connection

template_fields: Sequence[str] = ('sql',)[source]
template_ext: Sequence[str] = ('.sql',)[source]
template_fields_renderers[source]
ui_color = '#ededed'[source]

Was this entry helpful?