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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mra802003
Contributor III
Contributor III

How to capture error message due to which record got dropped in source

Hi,

 

I have designed a job that reads from file. Few rows are dropped at source while reading. The error message is logged in Run console in Talend Studio. Is there a way to redirect this error message to a file?

 

[ERROR]: XXX.sc_load_fppayplan_copy_0_4.SC_Load_FPPayPlan_Copy - tFileInputExcel_2 - The cell format is not Date in ( Row. 10468 and ColumnNum. 34 )
[ERROR]: XXX.sc_load_fppayplan_copy_0_4.SC_Load_FPPayPlan_Copy - tFileInputExcel_2 - The cell format is not Date in ( Row. 20090 and ColumnNum. 34 )
[ERROR]: XXX.sc_load_fppayplan_copy_0_4.SC_Load_FPPayPlan_Copy - tFileInputExcel_2 - The cell format is not Date in ( Row. 28960 and ColumnNum. 34 )

 

I have tried the using the tJava component at the start of the job and used the stream mechanism to direct the output from console to file. But this is generating me a file with no data in it. I am expecting the above set of error messages to be written to file as defined below.

 

java.io.File outputFileErr = new java.io.File(context.Delta_Error_dir+"Err_Msg.txt");

System.setErr(new java.io.PrintStream(new java.io.FileOutputStream(outputFileErr, true), true));

 

Any help in this regard is greatly appreciated.

 

Regards,

Manish Anand

Labels (3)
4 Replies
Anonymous
Not applicable

Hi
Take a look at this similar topic.
https://community.talend.com/t5/Deployment/resolved-save-output-in-run-window-to-txt-file/m-p/8414#M...

Let me know if it meets your need.

Regards
Shong

mra802003
Contributor III
Contributor III
Author

Thanks Shong.

I went through the link and found there is a mention of tDirectOutput component which directs the System.out and System.err to file. The same can be achieved using tJava component in the beginning of the job. I have implemented this in another job using tJava where I had to capture errors occurring at db target. The errors that I need to capture currently happens to be source which is dropping the rows and somehow this isn't getting captured from screen to file.

 

Regards,

Manish Anand

 

Anonymous
Not applicable

If I remember correctly, this component redirect all the error which are printed on the console to the file. The error mentioned in your first post can not be captured?
Do you want to stop reading the next rows if an error occurs or continue to read next rows even though an error occurs?

Regards
Shong
mra802003
Contributor III
Contributor III
Author

Hi Shong,

I need to process/read the records even when error occurs.

Regards,
Manish Anand