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

tFileDelete dosn't handle failures/errors despite optio"fail on error"

Dear Readers,
In our Talend Job there is a tFileDelete component that cleans the content of a directory.
However we need handle the case when at least one file could not be deleted.
When the job executes all files but not the locked ones are deleted. These circumstance
should trigger the mechanism "fail on error" but it is not. The link to "on subjob on error"
is not taken by the flow.
Kind regards,
Hilderich
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi Hilderich
Can you please upload a screenshot of your job deisgn? It will be helpful for us to understand your problem.
Shong
Anonymous
Not applicable
Author

Hi shong, I have already explained, the check if the file is deleted unfortunately does not use the normal mechanism, you have to check a string from the STATUS return variable.
When I saw the necessary steps to check that my first reaction was "What the fuck...." I am very confident, this terrible way will be changed or extended in the near future. It is far from being OK.
The file delete component is a bit strange designed!
After delete the given file the success can only be seen by this check:
"File deleted.".equals((String) globalMap.get("tFileDelete_1_CURRENT_STATUS"))

This boolean expression can be used in the if trigger.
For me this component is very bad designed. Why they do not have added a usable return value like DELETE_OK or let the component die if it does not work.
Actually if have not seen any difference in the code for fail-on-error. Probably a bug.
Anonymous
Not applicable
Author

Hi jlolling
I did not notice that the user have created two same topics due to our bad forum performance, and you have explained a solution in his another topic. For the bad forum performance issue, we have reported it to our IT team some days before and they are working on it.
Thanks!
Shong
Anonymous
Not applicable
Author

Yes, the double post are terrible at the moment. I hope your colleagues can fix that soon.
Anonymous
Not applicable
Author

Actually if have not seen any difference in the code for fail-on-error. Probably a bug.

jlolling, I test quickly the fail-on-error option of tFileDelete component with TOS4DI 5.4.1, and it works, when this option is checked, the job throws out the exception and dies if there occurs an error on tFileDelete such as the file does not exist, and it will trigger another subjob with OnsubjobError.
Shong