
Anonymous
Not applicable
2016-08-11
10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tFileUnarchive - How to know if the zip is invalid or has no entries?
Hello,
I have a question concerning the tFileUnarchiveComponent. I'm using it on some zip files, some of which may be invalid and some of which may have no entries. I would like to link to a component when an invalid zip file is encountered and I'd like to know if there are no rows (ie. no files) from a particular zip.
(Surprisingly, the onComponentError flow is not activated when there is an invalid zip.)
I'd be very grateful for any links to solutions or ideas for alternatives...
Thanks!
I have a question concerning the tFileUnarchiveComponent. I'm using it on some zip files, some of which may be invalid and some of which may have no entries. I would like to link to a component when an invalid zip file is encountered and I'd like to know if there are no rows (ie. no files) from a particular zip.
(Surprisingly, the onComponentError flow is not activated when there is an invalid zip.)
I'd be very grateful for any links to solutions or ideas for alternatives...
Thanks!
863 Views
- « Previous Replies
-
- 1
- 2
- Next Replies »
16 Replies

Anonymous
Not applicable
2016-08-12
12:59 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please take a look at component TalendHelpCenter:tFileProperties which obtains information about the main properties of a defined file.
There is a "size" schema (the file size in bytes). You can use it to check your invalid file with no entry(the file size should be 0).
Best regards
Sabrina
Could you please take a look at component TalendHelpCenter:tFileProperties which obtains information about the main properties of a defined file.
There is a "size" schema (the file size in bytes). You can use it to check your invalid file with no entry(the file size should be 0).
Best regards
Sabrina
600 Views

Anonymous
Not applicable
2016-08-12
03:49 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
Thanks for the reply. So I can use this component to determine if a zip file is empty. But what if a zip file is corrupt and can't be opened by the tFileUnarchive component? Is there any way of knowing this? The component logs an error but the onComponentError does not seem to be called when the archive is invalid...
François
Thanks for the reply. So I can use this component to determine if a zip file is empty. But what if a zip file is corrupt and can't be opened by the tFileUnarchive component? Is there any way of knowing this? The component logs an error but the onComponentError does not seem to be called when the archive is invalid...
François
600 Views

Anonymous
Not applicable
2016-08-12
06:14 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What's kind of component error message you are getting?
OnComponentError will trigger the sub-job or component as soon as an error is encountered in the primary Job
Best regards
Sabrina
What's kind of component error message you are getting?
OnComponentError will trigger the sub-job or component as soon as an error is encountered in the primary Job
Best regards
Sabrina
600 Views

Anonymous
Not applicable
2016-08-12
07:40 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using a corrupt zip, the tFileUnarchive component writes "archive is not a ZIP archive" in the log. If "Check the integrity before unzip" is checked then it writes "The file <xxx> is corrupted, process terminated..." to the log.
But in neither case is the onComponentError triggered. I was expecting to be able to use that trigger to determine that an archive is invalid...
Thanks,
François
But in neither case is the onComponentError triggered. I was expecting to be able to use that trigger to determine that an archive is invalid...
Thanks,
François
600 Views

Specialist
2016-08-12
11:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to trigger onComponentError execution by checking "Die on Error" in tFileUnarchive's settings. Will that help you?
600 Views

Anonymous
Not applicable
2016-08-12
12:25 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. That would be logical. I tried that but am still just getting an error in the log and the onComponentError does not get triggered. Maybe I'm missing some global configuration - will look into that possibility...
Thanks again.
Thanks again.
600 Views

Anonymous
Not applicable
2016-08-15
04:20 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
François.
Is there any update for your issue?
Best regards
Sabrina
Is there any update for your issue?
Best regards
Sabrina
600 Views

Anonymous
Not applicable
2016-08-18
06:07 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
I tried cterenzi's solution but if I check "Die on error" the onComponentError still does not get triggered. Is this behavior that can be configured?
Regards,
François
I tried cterenzi's solution but if I check "Die on error" the onComponentError still does not get triggered. Is this behavior that can be configured?
Regards,
François
600 Views

Anonymous
Not applicable
2016-08-18
06:15 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Would you mind sending an invalid zip file(corrupt, can not open by tFileUnarchive component)to us? In this way, we can make a simple testing for your use case.
Is your job design:tFileUnarchive-->oncomponenterror-->tfileinputproperties?
Best regards
Sabrina
Would you mind sending an invalid zip file(corrupt, can not open by tFileUnarchive component)to us? In this way, we can make a simple testing for your use case.
Is your job design:tFileUnarchive-->oncomponenterror-->tfileinputproperties?
Best regards
Sabrina
600 Views

- « Previous Replies
-
- 1
- 2
- Next Replies »