1

I have a large FME workspace with 5 readers, each of which are reading in many files, going through several transformers, and then writing out several resulting files.

Now I need to do the exact same process for a different set of files (a different geographic area). Everything in the workspace will be the same except for the names of read and written files.

FME seems not to allow the changing of a reader path (the read fails for me during execution), and does allow changing the path of the written file - although this gets cumbersome.

Rather than deleting all readers and redirecting all the writers with a bunch of mouse clicking, there must be a more elegant approach?

3 Answers 3

2

FME has a great functionality called Dynamic Schema. It allows you to use the same workspace on different data when you might not know the schema of the source files. You can implement dynamic readers as well as writers.

Here's an example from FME 2011 of how to implement Dynamic Schema.

1

FME workspace files are plain-text, so you can update input reader pathnames using "find and replace" in a text editor.

1
  • I would be careful with this. Some strings are encoded in "interesting" ways, and if you mess something up, it's liable to corrupt the workspace. Always make a backup, and do things through the UI unless there is no other way.
    – blah238
    Commented Apr 21, 2014 at 13:32
1

You may want to take the approach of using WorkspaceRunner as master workspace. On the workspace you already have, expose parameter path of the reader so it can be feeded externally with paths sent from master Workspace.

fme WorkSpaceRunner will fire a workspace for each, you can even run 8 in parallel or run one by one.

also i suppose the reader "Directory and File Pathnames" will be very helpful for you to create the path/filename to be sent as argument to your translation workspace from the workspace runner.

some more info can be found below.

http://fmepedia.safe.com/articles/Samples_and_Demos/WorkspaceRunner

https://www.youtube.com/watch?v=djeMx1j1R7I

How to read files one by one with FME

hope it helps. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.