I'm trying to run few queries/stored procs which will return a long text (varchar2/clob), eg: Table/View/etc ddl. Will be getting the long text, do some manipulation & store in a flat file.
I'm getting below output which is a truncated version (highlighted) of the whole thing:
("DROP VIEW <<view>>;\n\n/* Formatted on 27/05/2022 7:08:33 PM (QP5 v5.354) */\nCREATE OR REPLACE FORCE
VIEW <<view>> ... **(1097 characters truncated)** ... tx', '<<some value>>'),\n 'YYYYMMDD');
\n\n\nGRANT <<rights>>> ON <<view>> TO <<user>>;\n",)
I'm using below code:
conn_db = create_engine('oracle://<<user>>:<<pass>>@<<db_service>>')`
with conn_db.connect() as connection:
res = connection.execute("<<query/proc>>")
for row in res:
print(row) # this returns the above output
I've tried setting the arraysize while engine creation but didn't work.
arraysizeis a tuning parameter that affects internal buffer sizing when fetching multiple rows. It is not directly related to LOBs