Thursday, June 5, 2014

SQLDeveloper: exporting/importing of CLOB data (XML)

Ok, I know that SQLDeveloper should not be the tool for this job, but it's so convenient, readily available and flexible.

One can export to a SQL INSERT file, but the CLOB is not exported.
One can use TEXT export to a TSV file, but if the XML contains quotes, you are screwed.
One can use XML export, it's perfect because each field is wrapped in a CDATA, but when importing it fails with a "there are no readers registered for the xml data type" (what??? then why do you offer me a XML export if you can't import???)

I find the XML format very convenient, so I think I will write a Python script to import it to a DB.

Here I read that the XML reader is in the pipe for Oracle to develop.... the issue is that I will probably retire sooner that that.

No comments: