I'm trying to read data from an Oracle table that has one CLOB column. I'm able to create a dataframe with the data but I have to maintain the connection to the database.
df = pd.read_sql("""
select
COURSE_NUMB,
COURSE_DESCRIPTION
from COURSE_DATA
""",conn)
df.head(1)
COURSE_NUMB COURSE_DESCRIPTION
1 Lorem ipsum dolor sit amet, consectetur....
After I close the connection to the database, the CLOB data is no longer available.
conn.close()
df.head()
DatabaseError: DPI-1040: LOB was already closed
I've tried making copies of the dataframe or exporting it to a json file, but the CLOB data is still missing in the copy or export.