airflow.providers.yandex.operators.yq

Module Contents

Classes

YQExecuteQueryOperator

Executes sql code using Yandex Query service.

class airflow.providers.yandex.operators.yq.YQExecuteQueryOperator(*, name=None, folder_id=None, yandex_conn_id=None, public_ssh_key=None, service_account_id=None, sql, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes sql code using Yandex Query service.

Parameters
  • sql (str) – the SQL code to be executed as a single string

  • name (str | None) – name of the query in YandexQuery

  • folder_id (str | None) – cloud folder id where to create query

  • yandex_conn_id (str | None) – Airflow connection ID to get parameters from

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

Get valid hook.

execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

on_kill()[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?