Question

FME Bonus Material: Cloner and Sampler Replacement Tool


Userlevel 4
Badge +25

Hello FME'ers,

Remember, in older FME workspaces you may have used a Cloner or Sampler transformer to bring together a bunch of connection lines to tidy the workspace, like this:

In FME2016 you can, of course, use the new Junction transformer to do the same thing, like so:

But it would no doubt be a pain to have to review old workspaces and manually replace all those Cloners and Samplers with Junctions.

So, courtesy of @daleatsafe we bring you a tool to automatically replace all those Cloners and Samplers with the new Junctions. We don't replace all of those transformers; just the Cloners with a clone rate of 1, and just the Samplers with a sampling rate of 1 and a sample type of every nth feature. In other words, the Samplers/Cloners that don't do any specific transformation to the data.

Attached is a . Naturally it's a simple FME workspace that you run and point to the workspace you wish to update. Included in the zip file is the workspace above, in before-and-after forms, so that you can try it out and see what the results look like.

One word of caution: this tool is provided as-is. There are no guarantees and I'd suggest you keep back up copies of your workspaces until you're sure the updated versions are all correct and working as they did before. Not that we expect problems, we just haven't done a full set of testing.

I hope you find this useful.


0 replies

Be the first to reply!

Reply