This module contains the Trino operator.

Module Contents



Executes sql code using a specific Trino query Engine.

class airflow.providers.trino.operators.trino.TrinoOperator(*, trino_conn_id='trino_default', **kwargs)[source]

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

Executes sql code using a specific Trino query Engine.

This class is deprecated.

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

See also

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

  • sql – the SQL code to be executed as a single string, or a list of str (sql statements), or a reference to a template file.

  • trino_conn_id (str) – id of the connection config for the target Trino environment

  • autocommit – What to set the connection’s autocommit setting to before executing the query

  • handler – The result handler which is called with the result of each statement.

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

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

Override this method to clean up subprocesses when a task instance gets killed.

Any use of the threading, subprocess or multiprocessing module within an operator needs to be cleaned up, or it will leave ghost processes behind.

Was this entry helpful?