Skip to main content
Question

How to run one Workbench X times (Loop)


dataman
Contributor
Forum|alt.badge.img+5

Hey there,

I have written a workbench where I get some data from some weather-stations and generate the average temperature for that station as a line in a new Excel file.

 

It works great but we have 100 Weather stations and I want to make it with all of the stations and get the excel file with 100 lines...

 

I imagine it like:

for i in 0..99 loop

getDataFromStation(i)

processData()

writeDatain Excel(i)

end loop

 

But I have no way to do those loop in FME Desktop or Server. Or at leat I do not find it...

Has anyone any idea?

thanks a lot

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

You are looking for the WorkspaceRunner (desktop) and the FmeServerJobSubmitter (server).


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • July 19, 2023

How are you fetching the data from the weather stations? I think you should be able to achieve this in a single workspace without using a runner by fetching the data and using a group by and then writing to an excel file


dataman
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • July 20, 2023
ebygomm wrote:

How are you fetching the data from the weather stations? I think you should be able to achieve this in a single workspace without using a runner by fetching the data and using a group by and then writing to an excel file

Hey,

I am using the httpcaller in this way:

imageI have one URL per Station... How can I get more than one URL?

Thanks in advance


dataman
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • July 20, 2023
nielsgerrits wrote:

You are looking for the WorkspaceRunner (desktop) and the FmeServerJobSubmitter (server).

Hey,

thanks for the idea. I did not know the transformers. Can I using the parameters, call a workbench 100 times? Can I set a counter per workbench as parameter in order to download the right URL? like URL_1, URL_2...


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • July 20, 2023
dataman wrote:

Hey,

I am using the httpcaller in this way:

imageI have one URL per Station... How can I get more than one URL?

Thanks in advance

If for example, you have a csv containing a url for each station you can send a request per station using an attribute as your request url

image


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