Skip to content

Commit

Permalink
Add parameters to templated fields in OracleOperator (#22857)
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe authored Apr 12, 2022
1 parent 8b687ec commit 4147aa1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions airflow/providers/oracle/operators/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ class OracleOperator(BaseOperator):
(templated)
:param oracle_conn_id: The :ref:`Oracle connection id <howto/connection:oracle>`
reference to a specific Oracle database.
:param parameters: (optional) the parameters to render the SQL query with.
:param parameters: (optional, templated) the parameters to render the SQL query with.
:param autocommit: if True, each command is automatically committed.
(default value: False)
"""

template_fields: Sequence[str] = ('sql',)
template_fields: Sequence[str] = (
'parameters',
'sql',
)
template_ext: Sequence[str] = ('.sql',)
template_fields_renderers = {'sql': 'sql'}
ui_color = '#ededed'
Expand Down Expand Up @@ -73,10 +76,13 @@ class OracleStoredProcedureOperator(BaseOperator):
:param procedure: name of stored procedure to call (templated)
:param oracle_conn_id: The :ref:`Oracle connection id <howto/connection:oracle>`
reference to a specific Oracle database.
:param parameters: (optional) the parameters provided in the call
:param parameters: (optional, templated) the parameters provided in the call
"""

template_fields: Sequence[str] = ('procedure',)
template_fields: Sequence[str] = (
'parameters',
'procedure',
)
ui_color = '#ededed'

def __init__(
Expand Down

0 comments on commit 4147aa1

Please sign in to comment.