Nov 14, 2024
For future readers: The cx_Oracle driver was replaced by python_oracledb some years ago. Usage is the same since they both support the Python DB API. Note python-oracledb doesn't necessarily need any Oracle client libraries installed - they are optional.
The example shows looping over execute(). It would be MUCH more efficient to use executemany(). And also skipping the writing & reading from a local file will be a big win too.