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: 
Anonymous
Not applicable

Getting full Exception object.

Below is my job. I am trying to get the Exception object using tAssertCatcher, but I am not able to do so.
My tFileOutputDelimited throwing the following error :

Exception in component tFileOutputDelimited_1
java.io.FileNotFoundException: C:\out.csv (Access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at first_project.temp_0_1.temp.tRowGenerator_1Process(temp.java:597)
at first_project.temp_0_1.temp.runJobInTOS(temp.java:1720)
at first_project.temp_0_1.temp.main(temp.java:1573)

I want to get the exception object and take necessary action, but I am getting all the values empty in tAssertCatcher.

The following is my tLogRow :



first_project.temp_0_1.temp.main(temp.java:1573)
.------+---+-------+---+--------+------+------+---------+-----------+---------.
|                                  tLogRow_1                                  |
|=-----+---+-------+---+--------+------+------+---------+-----------+--------
|moment|pid|project|job|language|origin|status|substatus|description|exception|
|=-----+---+-------+---+--------+------+------+---------+-----------+--------
'------+---+-------+---+--------+------+------+---------+-----------+---------'




My question is : How can I get the exact Exception object for any component when any exception occurs, so that I can take necessary action based on the exception, also I want to start the job after the action is taken against the exception.

Thanks.


0683p000009MFra.png

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi,
The tAssert component works alongside tAssertCatcher to evaluate the status of a Job execution.
Could you please take a look at the related scenario in component reference:TalendHelpCenter:tAssert to re-design your workflow?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,

Now I have modified my Job and I am getting the exception object.

In the job below you can see that I have used onComponentOk   which is completely wrong according to me.
Because the component tFileOutputDelimited_1 is not ok, it contains error, So I am not understanding why tAssertCatcher working correctly and giving me the exception object.

Where as in my original question the behavior was straight forward i.e:. If the tFileOutputDelimited contains error then go to tAssertCatcher and give me the exception object which did not worked as expected but the above job is working fine and giving me the exception object which is exactly what I need.

My question is : Is this correct ?
According to my understanding it is not.

If possible please give me  explanation to this behavior, as I am not able to understand this. 

I hope I am clear with my doubt and question.

Best Regards

Shivkumar


0683p000009MFrf.png
Anonymous
Not applicable
Author

Hi,
Have you already checked the related scenario in component reference:TalendHelpCenter:tAssert?
The tAssert component works alongside tAssertCatcher to evaluate the status of a Job execution.
The work flow should be:trowgenerator-->tfileoutputdelimited-->onsubjobok-->tAssert
                                   tAssertCatcher -->tjavarow-->tlogrow
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,

Sorry to trouble you once again.

I again modified my job.This time I did not made any connection to tAssertCatcher and then I tried to run it.
I found the exception object. I experimented my job with error and with out error.
So according to me I have following conclusions.

1. The tAssertCatcher does not need any connection and it works at overall job level.
2. When an exception occurs it is triggered automatically and collects info about exception , which you can use , like the tStatCatcher which works at job level.

Below is my modified job.

My  tAssertCatcher collects data and works only when exception occurs else not.

If you feel anything inappropriate or incorrect please correct me.

Thank you for your response and support.


0683p000009MFrk.png
Anonymous
Not applicable
Author

Hi,
You should use tAssert component in your work flow which is used to provide the Job status messages to tAssertCatcher.
In this way, tAssertcatcher can work at overall job level.
[font=Verdana, Helvetica, Arial, sans-serif]Note:T[/font]he tAssert component works alongside tAssertCatcher to evaluate the status of a Job execution.
Best regards
Sabrina