cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

unzip file reader

heidi_andrew
Contributor

The zip file reader snap wont read my zip file with many files in it. Is there a limitation that you can only unzip a file with one file in it?

2 ACCEPTED SOLUTIONS

koryknick
Employee
Employee

@heidi_andrew - Depending on the file contents in the zipfile, if you are using the ZipFile Read snap, it sends each file to the next snap as a binary document.  For example, if the files are all the same CSV layout, you can simply place a CSV Parser after the ZipFile Read snap and it will process all incoming files as a consistent stream.  

Or if the zipfile is an archive of different files, you can use the Binary Router and inspect the "content-location" element which is the filename and send the streams to the appropriate parser for further processing.

Use "Validate Pipeline" to inspect the Zipfile Read output to get a better understanding of what the snap is doing.

Hope this helps!

View solution in original post

heidi_andrew
Contributor

Here is the syntax I had to use inside the binary router:

$.get('content-location')=="blahblahfile.txt"

View solution in original post

3 REPLIES 3

koryknick
Employee
Employee

@heidi_andrew - Depending on the file contents in the zipfile, if you are using the ZipFile Read snap, it sends each file to the next snap as a binary document.  For example, if the files are all the same CSV layout, you can simply place a CSV Parser after the ZipFile Read snap and it will process all incoming files as a consistent stream.  

Or if the zipfile is an archive of different files, you can use the Binary Router and inspect the "content-location" element which is the filename and send the streams to the appropriate parser for further processing.

Use "Validate Pipeline" to inspect the Zipfile Read output to get a better understanding of what the snap is doing.

Hope this helps!

heidi_andrew
Contributor

Here is the syntax I had to use inside the binary router:

$.get('content-location')=="blahblahfile.txt"

heidi_andrew
Contributor

one issue that remains is that the name of the zip file changes every time. It will have the date and time different each time. Is there a way i could set up a trigger to look at a file with a date greater than or = to doday? How would i look at the difference in the time?

heidi_andrew_0-1696519318432.png