airflow.providers.teradata.operators.teradata

Module Contents

Classes

TeradataOperator

General Teradata Operator to execute queries on Teradata Database.

TeradataStoredProcedureOperator

Executes stored procedure in a specific Teradata database.

class airflow.providers.teradata.operators.teradata.TeradataOperator(teradata_conn_id=TeradataHook.default_conn_name, schema=None, **kwargs)[source]

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

General Teradata Operator to execute queries on Teradata Database.

Executes sql statements in the Teradata SQL Database using Teradata Python SQL Driver

See also

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

Parameters
  • sql – the SQL query to be executed as a single string, or a list of str (sql statements)

  • teradata_conn_id (str) – reference to a predefined database

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

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

  • schema (str | None) – The Teradata database to connect to.

template_fields: Sequence[str] = ('sql', 'parameters')[source]
template_ext: Sequence[str] = ('.sql',)[source]
template_fields_renderers[source]
ui_color = '#e07c24'[source]
class airflow.providers.teradata.operators.teradata.TeradataStoredProcedureOperator(*, procedure, teradata_conn_id=TeradataHook.default_conn_name, parameters=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes stored procedure in a specific Teradata database.

Parameters
  • procedure (str) – name of stored procedure to call (templated)

  • teradata_conn_id (str) – The Teradata connection id reference to a specific Teradata database.

  • parameters (dict | list | None) – (optional, templated) the parameters provided in the call

template_fields: Sequence[str] = ('procedure', 'parameters')[source]
ui_color = '#ededed'[source]
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.

Was this entry helpful?