Skip to main content
Solved

How to Zip a file which downloaded through HTTPCaller


nag
Contributor
Forum|alt.badge.img
  • Contributor

Hello Team,

Present i am working on the FME Version: FME(R) 2015.1.1.0 (20150715 - Build 15515 - WIN64).

I could able to zip a downloaded file through HTTPcaller by using feature reader and single writer(text file) in independent workspace. Selected output as compressed Zipoutput in the writer parameters.

But when i did the same thing with my master workspace which is having a custom transformers and ArcSDE writer at that time i am getting output as text file with the .zip extension which is not compressed. I assume that output just updated with .zip extension and it got corrupted. Can somebody help me to resolve the issue??

 

Thanks..

Nagendra

Best answer by chrisatsafe

Hi @nshetty,

Have you tried using the FME Hub ZipArchiver transformer for this? That way you wouldn't need to read the files in with a FeatureReader (at least in the first example you gave). You can do the same for zipping the text file(s).

Are you currently using a Text File Writer and zipping the output? Does the translation log indicate any errors?

View original
Did this help you find an answer to your question?

3 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • Best Answer
  • July 15, 2019

Hi @nshetty,

Have you tried using the FME Hub ZipArchiver transformer for this? That way you wouldn't need to read the files in with a FeatureReader (at least in the first example you gave). You can do the same for zipping the text file(s).

Are you currently using a Text File Writer and zipping the output? Does the translation log indicate any errors?


nag
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • July 16, 2019
chrisatsafe wrote:

Hi @nshetty,

Have you tried using the FME Hub ZipArchiver transformer for this? That way you wouldn't need to read the files in with a FeatureReader (at least in the first example you gave). You can do the same for zipping the text file(s).

Are you currently using a Text File Writer and zipping the output? Does the translation log indicate any errors?

Thanks@chrisatsafe, Done my job with ZipArchiver. But i have one small query,

Can we delete input file after zipping?


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • July 19, 2019
nag wrote:

Thanks@chrisatsafe, Done my job with ZipArchiver. But i have one small query,

Can we delete input file after zipping?

Hi @nag,

Yes, you can delete the input after zipping by using the File/Copy writer. Check out Mark's answer on how to perform this task in this thread: https://knowledge.safe.com/answers/28113/view.html

I believe the only thing you will need to change is the filecopy_source_dataset attribute value to point to the data you are reading in. And just to re-iterate Mark's point, please test this before using this on your actual dataset.

Note: using something like the FeatureHolder after the ZipArchiver might also be helpful in case you want to ensure everything is zipped before deleting the file(s)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings