Skip to main content
Best Answer

Finish all prior steps before proceeding with a particular step

  • November 25, 2020
  • 4 replies
  • 951 views

I have a newbie question.

 

Can I instruct FME that I wish it to finish all previous steps (transformers), before proceeding with the next step?

 

By way of example I have a workbench that gets a list of files from FTP, downloads those that match a regex pattern (might be a few hundred mb), unzips them, and then needs to call a SystemCaller for some custom code to run. I need all the FTP files to be downloaded, and all the files to be unzipped before I run the next bit of code. FME wants to slide each file right the way through the workflow individual of each other. So, I might wind up collecting 10 files before I can run the SystemCaller, but I do need the 10 files present.

 

Something along the lines of "If there's 10 things on the input side, you need 10 things on the output side before proceeding".

Best answer by nielsgerrits

One way to do this is to use the Sampler transformer.

Connect the outputports from the transformers you want to wait for to the Sampler and set the parameters of the Sampler to Last N Features, Sampling Rate 1.

In earlier times I used a FeatureHolder and a Sampler, but now you can choose to release the last feature the FeatureHolder is not needed anymore.

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.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+64
  • Best Answer
  • November 25, 2020

One way to do this is to use the Sampler transformer.

Connect the outputports from the transformers you want to wait for to the Sampler and set the parameters of the Sampler to Last N Features, Sampling Rate 1.

In earlier times I used a FeatureHolder and a Sampler, but now you can choose to release the last feature the FeatureHolder is not needed anymore.


  • Author
  • November 25, 2020

Thanks - any need to use the "group by" function, or just Last N Features and Sample Rate as 1?


nielsgerrits
VIP
Forum|alt.badge.img+64

Thanks - any need to use the "group by" function, or just Last N Features and Sample Rate as 1?

Nope, group by not needed. I think you only want one feature to initiate the next step. If you try to process multiple batches as one, you might need the group by but I suspect this is not the case.


  • Author
  • November 25, 2020

Nope, group by not needed. I think you only want one feature to initiate the next step. If you try to process multiple batches as one, you might need the group by but I suspect this is not the case.

Golden. Worked a treat. Thank you!