-
Hey all, My company is moving to Airflow to handle our ETL pipeline. Airflow is about to start using the new OracleDB libary, moving away from CX-Oracle. One thing I was wondering is: Is it possible to run an entire Oracle SQL file with this library? In a lot of our SQL files we have multiple statements mixed with Stored Procedures. Ideally I'd love to just pass it in and have Airflow/OracleDB parse and run the file. My current solution is to split up the file into individual statements and run them as either an SQL statement or a Stored Procedure, but this is a bit time consuming and feels "wrong". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, it's possible but it needs to be done in Python. It's not part of the driver itself. See how the example SQL schema is installed by reading from a simplified SQL file in sample_env.py Also see the sample sqlp.py which reads interactively, is more tolerant of SQL / SQL*Plus / PL/SQL syntax but is missing some useful things like substitution and bind variable support. Pull Requests for improvements are welcome. |
Beta Was this translation helpful? Give feedback.
Yes, it's possible but it needs to be done in Python. It's not part of the driver itself.
See how the example SQL schema is installed by reading from a simplified SQL file in sample_env.py
Also see the sample sqlp.py which reads interactively, is more tolerant of SQL / SQL*Plus / PL/SQL syntax but is missing some useful things like substitution and bind variable support.
Pull Requests for improvements are welcome.