Skip to main content
Solved

How to Zip a file which downloaded through HTTPCaller

  • July 10, 2019
  • 3 replies
  • 65 views

nag
Contributor
Forum|alt.badge.img
  • Contributor
  • 41 replies

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • 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
  • 41 replies
  • July 16, 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?

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
  • 606 replies
  • July 19, 2019

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)