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(*, oracle_conn_id='oracle_default', **kwargs)[source]

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

Executes sql code in a specific Oracle database.

This class is deprecated.

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

Parameters
  • sql – 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, templated) the parameters to render the SQL query with.

  • autocommit – 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]
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 (dict | list | None) – (optional, templated) the parameters provided in the call

If do_xcom_push is True, the numeric exit code emitted by the database is pushed to XCom under key ORA in case of failure.

template_fields: Sequence[str] = ('parameters', 'procedure')[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?