cancel
Showing results for 
Search instead for 
Did you mean: 

Load a zip file from a download url link

nisars
New Contributor III

Hello,

Is it possible to extract data from the download link - NaPTAN and NPTG - NaPTAN - DfT

A file reader snap or a zip file reader only recognises this as a file as an asp.net file - Naptan.ashx, however clicking on the link downloads a zipped file containing 16 csv files.

Thank you for your help

1 ACCEPTED SOLUTION

Take a look at this pipeline, which I created to enable you to download the file, extract the contents from the zip file, and then remove the downloaded Zipfile.
ZipFile_2018_08_08.slp (13.2 KB)

View solution in original post

6 REPLIES 6

tlui
Former Employee

You should be able to plug the URL into a zip file reader. You may be hitting a limitation of preview such that there are some large files after you “unzip”. Do you have control over the endpoint such that you can have “smaller” files after the “unzip”? If so, you can make a smaller sample file so you can build your pipeline.

What you can also do is make your own smaller zip file and upload locally to SnapLogic for development and build your pipeline. When you are ready, you can swap out the URL for your naptan endpoint and then execute. Everything should work at that point.

nisars
New Contributor III

tlui, thank you for responding. I may have misunderstood your suggestions but using the url in a zip file reader results in the error -

Failure: Error decompressing zip file NaPTAN and NPTG - NaPTAN - DfT, Reason: Error decompressing zip file, Resolution: Please check if the file is a proper zip file

dmiller
Former Employee

I added an error view to a ZipFile Read and it states “Max bytes written for preview”, so it sounds like the file is too big to work with (downloading it directly, the zip file is 30.4 MB, extracted it’s 197.1 MB). I’m checking with Dev to see if we have any limits set on what can be used.


Diane Miller

Take a look at this pipeline, which I created to enable you to download the file, extract the contents from the zip file, and then remove the downloaded Zipfile.
ZipFile_2018_08_08.slp (13.2 KB)