python - cx_Oracle MemoryError when reading lob -
I'm getting "exceptions.memoryError" when trying to read data from a lob field using cx_Oralce. This code is working, this one lob field looks very big. Try
example: xml_cursor = ora_connection.cursor () xml_cursor.arraysize = 2000: xml_cursor.execute ("from xml_data select xml_cursor.fetchall () in xmlTable for data_data where id = 1" ): Str_xml = str (row_data [0]) #this throws "exception error."
. You have to piece it and get it into chunks (
select dbms_lob.substr (xml_data, ...
repeatedly) and feed it in an incremental XML parser (or it must be written in a file ), Or whatever you are trying to do with that multi-GB LOB).DBMS_LOB
is a well-documented Oracle-supplied package, and you can find your document in many places, e.g.
Comments
Post a Comment