airflow.operators.mssql_operator

Module Contents

class airflow.operators.mssql_operator.MsSqlOperator(sql, mssql_conn_id='mssql_default', parameters=None, autocommit=False, database=None, *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes sql code in a specific Microsoft SQL database

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 (mapping 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

template_fields = ['sql'][source]
template_ext = ['.sql'][source]
ui_color = #ededed[source]
execute(self, context)[source]

Was this entry helpful?