--

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.

--

--

Christopher Jones
Christopher Jones

Written by Christopher Jones

Oracle Database Product Manager for language drivers including Python python-oracledb, Node.js node-oracledb, PHP OCI8 and more! On Mastodon: @cjbj@phpc.social

Responses (1)