Skip to main content
Question

I have four datasets I need to process using the exact same method, the only difference is the input dataset/output dataset.

  • November 6, 2020
  • 2 replies
  • 21 views

ecx
Supporter
Forum|alt.badge.img+5
  • Supporter
  • 31 replies

I currently have four identical methods, the only difference is the input and output datasets.

 

Basically the script looks like this:

Reader of dataset 1-> processing method X -> writer to dataset 1

Reader of dataset 2-> processing method X -> writer to dataset 2

Reader of dataset 3-> processing method X -> writer to dataset 3

Reader of dataset 4-> processing method X -> writer to dataset 4

 

As you can see the processing method X does not change because all of the input datasets/output are similar, and is simply repeated, copy and pasted.

 

Is there a better way to do this that isn't as cluttered? Is it possible to loop through readers /writers to avoid having to copy and paste the method over and over?

 

Thanks.

 

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.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 6, 2020

You can use a workspace runner, to run your processing method once for each input and output dataset


Forum|alt.badge.img+2
  • 1891 replies
  • November 9, 2020

@ecx​  I'm assuming that the reader and writer for all four processes are also the same, is this correct? There are a few approaches, depending on whether you want to automate the process, or just run the manually. Also, it all depends somewhat on whether you working with file formats or databases.

Manual: If you're happy to run them manually, then simply change the reader and writer datasets.

Batch: At the top of your FME log you'll see the batch command. You can create a batch file and then run that.

WorkspaceRunner: as suggested by @ebygomm​ . A little more complex to configure.

FME Server: FME's automation application