Skip to main content
Question

Set macro SourceDataset using published parameter

  • July 1, 2014
  • 2 replies
  • 33 views

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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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.