Thanks to @ChristopherJones i've been able to extract the data. This is on the oracledb library docs. https://python-oracledb.readthedocs.io/en/latest/user_guide/sql_execution.html#fetching-raw-data I had to migrate my code of cx_Oracle to oracble db.