Skip to main content
Question

Use HTTPCaller to download file, to use in my workflow

  • May 10, 2023
  • 9 replies
  • 819 views

I want to create a workflow that downloads a file from the internet (SHP file compressed as ZIP file). That file should then be used in my workflow for further analysis and processing.

 

How should I set that up? I now have a "Creator", followed by a 'HTTPCaller'. This HTTPCaller downloads my ZIP file (contains a SHP file). How can I now use this data for further processing? When I use a ESRI SHP File Reader, I can't seem to send this file as an input to that Reader?

 

 

9 replies

tomfriedl
Contributor
Forum|alt.badge.img+13
  • Contributor
  • 177 replies
  • May 10, 2023

You can use the transformer FeatureReader to read your SHP-File after download.


hkingsbury
Celebrity
Forum|alt.badge.img+63
  • Celebrity
  • 1632 replies
  • May 10, 2023

You can use the transformer FeatureReader to read your SHP-File after download.

Also make sure your are saving your response body to a file/folder. The path you pass to the FeatureReader will be the "_reponse_file_path" attributeimage 


geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 933 replies
  • May 11, 2023

You can use the transformer FeatureReader to read your SHP-File after download.

If you don't want to save the response body permanently, insert a TempPathnameCreator before the HTTPCaller. Store the downloaded zip file in the path created by this transformer. That way, the downloaded data will automatically be removed at the end of the workspace.

TempPathnameCreator_HTTPCaller_FeatureReader


  • Author
  • 4 replies
  • May 11, 2023

You can use the transformer FeatureReader to read your SHP-File after download.

FeatureReader does the trick! That's an awesome transformer. Thanks.


  • Author
  • 4 replies
  • May 11, 2023

Also make sure your are saving your response body to a file/folder. The path you pass to the FeatureReader will be the "_reponse_file_path" attributeimage 

Good tip, thanks, just what I needed.


  • Author
  • 4 replies
  • May 11, 2023

If you don't want to save the response body permanently, insert a TempPathnameCreator before the HTTPCaller. Store the downloaded zip file in the path created by this transformer. That way, the downloaded data will automatically be removed at the end of the workspace.

TempPathnameCreator_HTTPCaller_FeatureReader

Great suggestion too. Learning so much today!


virtualcitymatt
Celebrity
Forum|alt.badge.img+47

Depending on how you are getting the URL you can also just read directly from a URL in either the feature reader of normal reader.

 

image


  • Author
  • 4 replies
  • May 11, 2023

Depending on how you are getting the URL you can also just read directly from a URL in either the feature reader of normal reader.

 

image

thanks, will keep that in mind, i might need that


hodsen96
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 6 replies
  • March 13, 2025

You can use the transformer FeatureReader to read your SHP-File after download.

If you don't want to save the response body permanently, insert a TempPathnameCreator before the HTTPCaller. Store the downloaded zip file in the path created by this transformer. That way, the downloaded data will automatically be removed at the end of the workspace.

TempPathnameCreator_HTTPCaller_FeatureReader

When I do the same, I end up having to expose the attributes after the feature reader using an AttributeExposer, is that intended? Is there a setting in the feature reader i should be utilizing to avoid this?