[cx-oracle-users] Reading CLOB output
Brought to you by:
atuining
From: Orr, S. <so...@ri...> - 2004-03-19 20:04:05
|
I'm using the cool 9i dbms_metadata package from SQLPlus but can't figure out how use it with cx_Oracle 4. Here's a clipping from a SQLPlus session: --------------------------------------------------------------------- SQL> SELECT dbms_metadata.get_ddl('TABLE','NODELINK') from dual; CREATE TABLE "HYDRA"."NODELINK" ( "ID" NUMBER, "PARENTID" NUMBER, "NODETEXT" VARCHAR2(252) ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" --------------------------------------------------------------------- This returns the DDL for a database object as a CLOB. I've tried to use the cx_Oracle lob.read() function in Python but can't seem to figure it out. Can you provide some sample code on this? TIA!! Steve Orr |