hneff1
Posts: 16
Joined: Fri May 22, 2015 7:53 pm

Read Specified file .zip file - no error raised if file does not exist in zip?

Postby hneff1 » Tue Jul 25, 2017 8:08 pm

Question regarding this syntax for reading zip file contents with Flat File Reader component:
zip:(/path/file.zip)#innerfolder/filename.txt - Reads a specified file compressed in the file.zip file.

I am trying to read a specified file contained in a zip file. The syntax below works correctly.

zip:(${DATAIN_DIR}/CMTestFile.zip)#dim_ident.dat

My question is: if for some reason, on a particular day the specified file was not contained in the zip file sent by the client, why does the zip syntax above not indicate a missing source file as it would in the case of a non-zip file?

zip:(${DATAIN_DIR}/CMTestFile.zip)#dim_ident.dat
if dim_ident.dat is missing from the directory the graph runs successfully:
---------------------------------------------------------------------------------
14:59:06,211 INFO [WatchDog_14] Read CR Identity READ_CR_IDENTITY FINISHED_OK
14:59:06,211 INFO [WatchDog_14] %cpu:0 Out:0 0 0 0 0
14:59:06,211 INFO [WatchDog_14] Out:1 0 0 0 0
14:59:06,211 INFO [WatchDog_14] ---------------------------------** End of Log **--------------------------------
14:59:06,211 INFO [WatchDog_14] Execution of phase [0] successfully finished - elapsed time(sec): 0

${DATAIN_DIR}/dim_ident.dat
(if this file is missing from the directory the error is:
Component [Read CR Identity:READ_CR_IDENTITY] finished with status ERROR. (Out0: 0 recs, Out1: 0 recs)
Component pre-execute initialization failed.
File is unreachable: sandbox://client_etl/data-in/dim_ident.dat
File client_etl:data-in/dim_ident.dat does not exist

In the event that the specified file within the zip is not present, I would like to raise an error. Is there a way to do this using the above zip syntax?

Thanks,
Heather

vazquezrosariop
Posts: 107
Joined: Mon Feb 29, 2016 5:33 pm

Re: Read Specified file .zip file - no error raised if file does not exist in zip?

Postby vazquezrosariop » Thu Aug 03, 2017 6:42 pm

Hi Heather,

Thank you for reporting this issue, I have taken the liberty of creating a ticket in our system and our Developers are currently working on establishing a fix for our next CloverETL release. In the meantime, I have created a workaround that will cause the graph to fail if the specified file is not present in the zip.

ZipReader.grf
(6.17 KiB) Downloaded 6 times
---
Pedro Vazquez Rosario
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support

hneff1
Posts: 16
Joined: Fri May 22, 2015 7:53 pm

Re: Read Specified file .zip file - no error raised if file does not exist in zip?

Postby hneff1 » Thu Aug 10, 2017 4:42 pm

Hi Pedro. Thanks for the reply. Can you alert me when this fix is available in a CloverETL release so we can upgrade?

Thanks,
Heather


cron