Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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