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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

ORACLE CLOB to SYBASE TXT USING TOS

Very Very Urgent,
I'm able to load some data using the method suggested by xiao which works for some rows but is generating NULL for some CLOBS. I don't know the reason why it's doing that and would like to get some help. If I route it to a tlogrow i'm able to see the text.
inStreamDoc=((java.sql.Clob)row1.PR_CPY).getCharacterStream();
inStreamDoc1=((java.sql.Clob)row1.PR_CPY_TXT).getCharacterStream();
   char[] tempDoc = new char;
      char[] tempDoc1 = new char;
   inStreamDoc.read(tempDoc);
   inStreamDoc1.read(tempDoc1);
   syb.pr_cntn=new String(tempDoc);
   syb.pr_txt_cntn=new String(tempDoc1);

Exception in component tSybaseOutput_1
com.sybase.jdbc3.jdbc.SybSQLException: Attempt to insert NULL value into column 'por_txt_cntn', table 'rgovdb.csd.pawd_por'; column does not allow nulls. Update fails.
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeUpdate(Unknown Source)
at awardsearch.load_pawdpor_0_1.load_pawdpor.tOracleInput_1Process(load_pawdpor.java:2945)
at awardsearch.load_pawdpor_0_1.load_pawdpor.runJobInTOS(load_pawdpor.java:3361)
at awardsearch.load_pawdpor_0_1.load_pawdpor.main(load_pawdpor.java:3219)
disconnected
Labels (4)
5 Replies
Anonymous
Not applicable
Author

com.sybase.jdbc3.jdbc.SybSQLException: Attempt to insert NULL value into column 'por_txt_cntn', table 'rgovdb.csd.pawd_por'; column does not allow nulls. Update fails.
>>> in your flow, replace null values by some arbitrary value, your db column doesnot allow nulls.

vaibhav
Anonymous
Not applicable
Author

Ok. I think I understand the problem. How to I read a text which is coming from a clob and has multiple lines. Can someone please tell me how to make sure it goes into the column 
This project is cutting edge. 
Technology 
for everyone.
Anonymous
Not applicable
Author

Hi,
CLOB is a column in database... read the data, store in context variable as an object and then using java parse it to text or required format. You will get lots of help on transforming data from clob to required format using java.
Thanks
vaibhav
Anonymous
Not applicable
Author

Vaibhav,
I was able to convert to text but the problem is, there are multiple line breaks in the text column which is why the job is failing. 
So I need help in ignoring the linebreaks. 
If I generate a csv file with the text enclosed in quotes is it easier to ignore the line breaks within the quotes. If yes what is the csv options that I need to set. 
Anonymous
Not applicable
Author

In tFileOutputDelimited, there is a check box (CSV options). If you enable this checkbox, you can have your field enclosure may be "\"".
If you create output metadata, so while creating that metadata, you have that option in wizard.
thanks
vaibhav