Skip to main content
Question

Set macro SourceDataset using published parameter


I am to use public parameter to append to SourceDataset macro. I want to keep initial folder fixed in my case it's /roor/FME/.

 

 

Steps taken

 

-Define Published Parameter as INPUT_DATA which will contain relative e.g. path /data/shape/1.shp.

 

-Append above param to SourceDataset_GENERIC by "/root/FME/$(INPUT_PATH)"

 

 

This is working well on my windows machine (FME Desktop 2014) but when I publish it to FME server (linux) somwhow it is retaining a reference to my windows machine's path as a result of this it's throwing an error as "No Shape Files found to process in directory `C:/root/FME/data/1.shp'. Check directory and ids statement in mapping file"

 

 

I am struggling to find a reason for this behaviour.

2 replies

david_r
Celebrity
  • July 1, 2014
Hi,

 

 

I have no idea why this happens, but you could try to convert "SourceDataset_GENERIC" to a Python scripted parameter with the following code and see if it works better:

 

 

return "/root/FME/" + FME_MacroValues['INPUT_DATA']

 

 

David

  • Author
  • July 2, 2014
Thanks David. It works.

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