• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Using tOracleinput for migrating CLOB data

#1 2011-10-09 05:19:21

evdios
Member
Registered: 2009-08-23
Posts: 17

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.

Offline

#2 2011-10-11 03:11:40

vgalopin
Talend team
Registered: 2009-04-15
Posts: 440
Website

Re: Using tOracleinput for migrating CLOB data

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/2169 … ob-in-java


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#3 2011-10-11 16:41:01

evdios
Member
Registered: 2009-08-23
Posts: 17

Re: Using tOracleinput for migrating CLOB data

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.

Offline

#4 2011-10-16 19:35:08

venkatesh
Member
Registered: 2011-06-23
Posts: 23

Re: Using tOracleinput for migrating CLOB data

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

Offline

#5 2011-10-17 21:02:24

vgalopin
Talend team
Registered: 2009-04-15
Posts: 440
Website

Re: Using tOracleinput for migrating CLOB data

evdios,

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


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#6 2011-10-18 10:03:43

janhess
Member
Company: Newcastle University
Registered: 2009-05-19
Posts: 1121

Re: Using tOracleinput for migrating CLOB data

Venkateshs' method is easier.

Offline

#7 2011-10-18 14:44:00

vgalopin
Talend team
Registered: 2009-04-15
Posts: 440
Website

Re: Using tOracleinput for migrating CLOB data

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.


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#8 2011-10-18 17:04:54

evdios
Member
Registered: 2009-08-23
Posts: 17

Re: Using tOracleinput for migrating CLOB data

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.

Offline

#9 2011-10-18 17:16:32

janhess
Member
Company: Newcastle University
Registered: 2009-05-19
Posts: 1121

Re: Using tOracleinput for migrating CLOB data

vgalopin wrote:

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.

Offline

#10 2011-10-24 14:20:00

evdios
Member
Registered: 2009-08-23
Posts: 17

Re: Using tOracleinput for migrating CLOB data

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?

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Using tOracleinput for migrating CLOB data

Board footer

Powered by FluxBB