One Star

tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

During output to the text file, talend cannot output the CLOB as text. I need to use that output to feed a downstream tOracleBulkExec.

Sample output in output file, for the CLOB column:
<startlob>oracle.sql.CLOB@50a649<endlob>
For the CLOB column, the java type is object, length 1000000, and oracle db type is CLOB. Changing the length does not help.
I have read all the posts.
6 REPLIES
Moderator

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Hi,
Which talend product version build are you using? Is it normal when you use toracleoutput instead?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Hi,
Which talend product version build are you using? Is it normal when you use toracleoutput instead?
Best regards
Sabrina

We are using TOS v5.1.3.
Yes, we can transfer CLOBs from oracle to oracle using conventional Oracleinput=>tmap=>Oracleoutput. However, CLOBs over 3890 bytes require us to create an inputstream=>string=>object=>tMap=>Oracleoutput. So, definately a bug there.
The main reason we would like to use bulk is for speed.
Dave
One Star

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Any answer to this?
We need to use tOracleOutputBulkExec transfer data that has CLOBs
Dave
One Star

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Sabrina,
Were also experiencing the same issue with v5.1.3. Large CLOBs are showing in our database as "oracle.sql.CLOB@6b552b76".
We just need the ability to go to a tOracleOutput (as we were told a clob to SCD was not supported). Any answer to Dave's question would be great or if you could explain with screenshots how we would set up "inputstream=>string=>object=>tMap=>Oracleoutput"?
Thanks,
Chris
Employee

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Hi?
You should add a new component for transfer the object to real text, for example, a tJavaFlex.
Please find the code in the attached screenshot. Hope this can help you.
Best Regards,
Bing
One Star

Re: tOracleOutputBulk outputs CLOBs as oracle.sql.CLOB@, not the real text

Excellent answer xiao. I'm able to insert some rows but it is failing for some CLOBS with the below error. 
Exception in component tSybaseOutput_1
com.sybase.jdbc3.jdbc.SybSQLException: Attempt to insert NULL value into column 'abc', table 'sybastable'; column does not allow nulls. Update fails.
The difference that i see between the CLOBS to txt columns that got inserted is that this CLOB for which talend is generating NULL is bigger that the CLOB that are getting inserted. 
The CLOB has lot of text. Is there anything that I can do?