Skip to main content

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.

 

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


@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


Reply