Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using tOracleinput for migrating CLOB data

Here is a brief description of the components used in a simple migration of Oracle data into a MySQL MyISAM table:
tOracleinput (contains one CLOB column) --> tMap --> TMysqlOutput (with a longtext column for the CLOB data)
We are using TIS 4.0.3 and this results in an error "cannot convert from Object to String" since the CLOB database column is represented as an Object type in Talend and the MySQL longtext column is represented as a String in Talend.
I am hoping that there is someone in this forum that has encountered this issue and has found a resolution. I have used many search terms and did not find any close hits.
Thanks.
Labels (2)
9 Replies
Anonymous
Not applicable
Author

Hi evdios,
I guess you'll have to convert the Object into a String in Java.
Here is an example on how to do so:
http://stackoverflow.com/questions/2169732/most-efficient-solution-for-reading-clob-to-string-and-st...
Anonymous
Not applicable
Author

Thanks, vgalopin for your response. I am glad I posted this in the forum because I am still waiting for Talend Support's reply to my support request (we have TIS).
I am not a java expert so any help in how I can use the example you provided will be appreciated. Do I create a Talend Routine?
Thanks.
Anonymous
Not applicable
Author

I had a similar problem earlier. I tried changing data type to String from Object in schema it works!!
Anonymous
Not applicable
Author

evdios,
Yes I would create a routine, and replace the sample function that's in there by the code from my link.
janhess
Creator II
Creator II

Venkateshs' method is easier.
Anonymous
Not applicable
Author

Well only if you are able to modify the target schema, I was just considering that the target table already exists and cannot be modified.
Anonymous
Not applicable
Author

As a matter of fact, the target schema already exists in our case and therefore we followed vgalopin's solution. I just asked for a little help from one of our java folks and we walked through the creation of the custom routine. My realm of expertise is more on the DB-sql-plsql-etc side of things; my java is rusty at best.
Thanks a lot to all who assisted here.
janhess
Creator II
Creator II

Well only if you are able to modify the target schema, I was just considering that the target table already exists and cannot be modified.

It's the source schema that needs the change so that can be done in the Talend component without affecting the database.
Anonymous
Not applicable
Author

Thanks venkatesh and janhess as well. That worked and it is much simpler. Do any of you know what the length limit might be on the String type?