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.


ecx
Supporter
Forum|alt.badge.img+4
  • Supporter

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.

 

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • 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
  • 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


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