Skip to main content

I have several fmw files that read and/or write to a particular folder structure. But sometimes the location of the folder structure changes servers. So i'm wanting a way to set a root variable for readers/writers so i only have to update the one variable instead of updating all fmw readers/writers.

 

--------------------UPDATE--------------------

I need to add, my intention is to have one variable/setting/config that is globally available across all my workspaces. So changing one configuration would affect all workspaces.

For example, in a shapefile writer, the dataset location is d:\\folder\\to\\file.shp, but I'd like to change the location to something like $(GlobalVar)\\folder\\to\\file.shp. Where GlobalVar is available across all workspaces.

You can setup a User Parameter of type Folder and use that in your Readers and Writers.

Folder Parameter


You can setup a User Parameter of type Folder and use that in your Readers and Writers.

Folder Parameter

Setting this works well in the same workspace. I swapped to another workspace and couldn't find it, though. How can I get this parameter to be globally exposed across all workspaces?


Setting this works well in the same workspace. I swapped to another workspace and couldn't find it, though. How can I get this parameter to be globally exposed across all workspaces?

Have a look at the suggestion from @nielsg​  here: https://community.safe.com/s/question/0D54Q000080hIbySAE/how-can-i-script-a-connection-parameter-with-python


Setting this works well in the same workspace. I swapped to another workspace and couldn't find it, though. How can I get this parameter to be globally exposed across all workspaces?

Another way to do it is to store your path in a file (lets say .csv), read the file and join your data with the path attribute from that file. I am not a fan of scripts 😐

It's not the most elegant solution, it requires creating a join attribute on your data, longer processing time and to modify all your existing workspaces.


Reply