Skip to main content
Question

For loop in FME


raaaju1990
Contributor
Forum|alt.badge.img+6

I'm accessing an API using FME and trying to fetch records by passing certain ids as a parameter to the API . For example the API is,

https://developers.onemap.sg/commonapi/elastic/omsearch?searchVal=1&returnGeom;=Y&getAddrDetails;=Y

In the above API, I need to keep on increment the value of searchVal=1 from 1 to 100 and then pass each to httpcaller to return the response.

I'm able to do this using python caller and get the response using for loop concept. But, I want to do this without python and use any other transformers which does the trick for me.

Any guidance would be appreciated.

Thanks!

2 replies

david_r
Celebrity
  • July 11, 2018

oscard
Influencer
Forum|alt.badge.img+21
  • Influencer
  • July 11, 2018

I would use a Creator with 100 copies.

With AttributeManager I would create a new attribute: searchval = (@Value(_creation_instance) + 1)

The request would be like this:

https://developers.onemap.sg/commonapi/elastic/omsearch?searchVal=@Value(searchval)&returnGeom;=Y?tAddrDetails=Y


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