It would be great to extend jinja templating to sql parameter for SQL Operators.
With this improvement, it's possible to have extended Jinja template like below that generates multiple SQL statements that can be passed as a single 'sql' parameter, separated by ';' separator:
Notice there are three Jinja 'for' loops that generate multiple SQL DDL statements.
Without this change, sql has to be passed as an Python array, and Jinja templating can't be used.
I've tested this change with OracleOperator and works as expected.
Notice `run_as_script=True` parameter. run_as_script defaults to False so this is a backward-compatible change.
Most of the change is in airflow/hooks/dbapi_hook.py (very straightforward as run() already supports running an array of statements) and a light change of airflow/operators/oracle_operator.py - so this change can be easily applied to other sql operators.