airflow.providers.oracle.operators.oracle

Module Contents

Classes

OracleOperator

Executes sql code in a specific Oracle database.

OracleStoredProcedureOperator

Executes stored procedure in a specific Oracle database.

class airflow.providers.oracle.operators.oracle.OracleOperator(*, sql, oracle_conn_id='oracle_default', parameters=None, autocommit=False, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes sql code in a specific Oracle database.

Parameters
  • 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)

  • oracle_conn_id (str) – The Oracle connection id reference to a specific Oracle database.

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

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

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

class airflow.providers.oracle.operators.oracle.OracleStoredProcedureOperator(*, procedure, oracle_conn_id='oracle_default', parameters=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes stored procedure in a specific Oracle database.

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

  • oracle_conn_id (str) – The Oracle connection id reference to a specific Oracle database.

  • parameters (Optional[Union[Dict, List]]) – (optional, templated) the parameters provided in the call

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