Module Contents



Executes sql code in a specific Sqlite database

class airflow.providers.sqlite.operators.sqlite.SqliteOperator(*, sql, sqlite_conn_id='sqlite_default', parameters=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes sql code in a specific Sqlite database

See also

For more information on how to use this operator, take a look at the guide: SqliteOperator

  • sql (Union[str, Iterable[str]]) -- the sql code to be executed. Can receive a str representing a sql statement, a list of str (sql statements), or reference to a template file. Template reference are recognized by str ending in '.sql' (templated)

  • sqlite_conn_id (str) -- reference to a specific sqlite database

  • parameters (Optional[Union[Iterable, Mapping]]) -- (optional) the parameters to render the SQL query with.

template_fields :Sequence[str] = ['sql'][source]
template_ext :Sequence[str] = ['.sql'][source]
ui_color = #cdaaed[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?