Skip to main content

I have a workbench set up on a desktop PC that is reading numerous data sets from folders on that computer. The workbench is also saved locally.

I have moved a copy of the data and workbench in the same folder structure onto our shared network where the start of the file path is different.

eg.

C:\\Data\\Workbench.fmw & C:\\Data\\Input\\Data.xls

becomes

P:\\Project\\Projectname\\Data\\Workbench.fmw &

P:\\Project\\Projectname\\Data\\Input\\Data.xls

 

How can I set up the workbench so I only need to change the folder path to data sources once, and all the others know that the relative path has changed?

 

Thanks!

You can use nested Parameters. So create a new parameter e.g. PARAMETER1 with the beginning of the path like "P:\\Project\\Projectname\\" as a value and a second one e.g. PARAMETER2 where you use PARAMETER1 and the second part of the path or the filename like $(PARAMETER1)\\Data\\Workbench.fmw . Than you only need to change the value of the first parameter and you can use it like a variable.

Finally you have to put PARAMETER2 as the source-parameter of you input data.


Is this still the most convenient way to move workspaces between different computers?


Here’s an approach that is slightly less cumbersome, but only works if your paths of interest are subpaths of your workspace’s folder.

I was going to provide a “how-to” here, but while searching for the correct terminology, I came across this post from a few months ago that illustrates it well: FME_MF_DIR predefined parameter (macro) – FME Support Center (safe.com).

In a nutshell: after adding a reader or writer that refers to a file location, edit the automatically-created user parameter for the file’s path to be $(FME_MF_DIR)<subpath_within_workspace>; e.g. $(FME_MF_DIR)Input, or $(FME_MF_DIR)Output.


Reply