[resolved] Converting Object(BLOB) to String

One Star

[resolved] Converting Object(BLOB) to String

Hi,
i'm trying to convert an Object field (Blob type) into String... actually i'm looking for a talend equivalent for "convert(column using utf8)".
That works in my case, but i have several fields to convert using talend... it there an alternative?
Thanks!

Accepted Solutions
Seventeen Stars

Re: [resolved] Converting Object(BLOB) to String

This cannot work because if you have in the schema the java type Object you will get a java.sql.Clob object and that cannot be cast to String.
Please edit the schema of the table and set the CLOB columns to the Java type String. 
In the tMap it is to late. You have to force the database input component to get the value as String and not as java.sql.Clob object. 

All Replies
Seventeen Stars

Re: [resolved] Converting Object(BLOB) to String

Did you tried to set as Java type in the Talend schema for these kind of columns the type "String" ?
One Star

Re: [resolved] Converting Object(BLOB) to String

Hi jlolling,
i used "(String)row1.column" in tmap but only gives me random characters
Thanks
Seventeen Stars

Re: [resolved] Converting Object(BLOB) to String

This cannot work because if you have in the schema the java type Object you will get a java.sql.Clob object and that cannot be cast to String.
Please edit the schema of the table and set the CLOB columns to the Java type String. 
In the tMap it is to late. You have to force the database input component to get the value as String and not as java.sql.Clob object. 
One Star

Re: [resolved] Converting Object(BLOB) to String

UPDATE:
i've set the Java type to String and same results
Seventeen Stars

Re: [resolved] Converting Object(BLOB) to String

Please show me a screenshot. I do the same and have problems with it.
One Star

Re: [resolved] Converting Object(BLOB) to String

Hey finally WORKS!!!
i've change the Schema as you said and it works...
Thank you so much