Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, the job works as follows:
I need to recover data from the WS, so if the WS returns 0 data (0 rows), I need to throw an exception, not the "NullPointerException". I tried with the "tFileRowCount" to read the rows, if rows == 0 throw exception otherwise "tfileOutputDelimited", and it did not work. I made screenshots to make it clear at the job level: someone can help me plzz!
Thank you for your answer, I will test it later.
Beside that, I found the solution that meets my needs;
we do a test with the "if":
((Integer) globalMap.get (" tLogRow_1_NB_LINE ")) == 0
If the WS returns 0 data, we generate empty files but with a warning message "WARNING :: This WebService is down and returns No Data" with the tDie.
I hope it will help you one day
Hi,
Could you please try the below method? Here, when I am specifying zero records in trowgenerator, no records will be written into the target file. I have allowed the subjob to complete. I verified the number of records loaded by the pseudo variable NB_LINE linked to tfileoutputdelimited (use control space to view it) and add it as condition in Run if line
((Integer)globalMap.get("tFileOutputDelimited_1_NB_LINE")) ==0
This resulted in printing the value in second tjava job. The concept remains same for your job also.
If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Thank you for your answer, I will test it later.
Beside that, I found the solution that meets my needs;
we do a test with the "if":
((Integer) globalMap.get (" tLogRow_1_NB_LINE ")) == 0
If the WS returns 0 data, we generate empty files but with a warning message "WARNING :: This WebService is down and returns No Data" with the tDie.
I hope it will help you one day