Skip to main content
Solved

Accessing FME Cloud resources files

  • Feb 25, 2015 2:54 PM UTC
  • 8 replies
  • 119 views

fmelizard
Safer
Forum|alt.badge.img+22
Hi,

 

I would like to know if anybody has any experience on how to access files on an FMECloud instance. To clarify a bit, I have a xls file in a folder in the resources section that I would like to access in mid-translation via FME desktop. The idea is to verify details that are on the xls file before continuing with the translation.

 

I was thinking on using the HTTPCaller, but couldnt access the resources section on the instance.

 

Any tips would be appreciated.

 

Itay

 

 

Best answer by david_r

No sure if the shared resource files are directly accessible via HTTP on FME Server. But you could of course publish a simple workspace on the cloud that returns your resource file over HTTP.

 

 

David
View original
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.

8 replies

david_r
Celebrity
  • Feb 25, 2015 3:03 PM UTC
Hi,

 

 

there are a couple of published parameters available on FME Server to access the shared resources:
  • FME_SHAREDRESOURCE_TEMP
  • FME_SHAREDRESOURCE_DATA
So if you upload "myData.xls" into the Data resource section on FME Server, you can access it with e.g. a FeatureReader using $(FME_SHAREDRESOURCE_DATA)/myData.xls

 

 

You can also create subdirectories in the shared resources to organize your files.

 

 

David

fmelizard
Safer
Forum|alt.badge.img+22
  • Author
  • Safer
  • Feb 25, 2015 3:10 PM UTC
Hi David,

 

Thanks for the info, unfortunatly this wil only work if the ws is run on the instance, I would like to run the ws locally and access the files.

david_r
Celebrity
  • Feb 25, 2015 3:13 PM UTC
Then I would suggest using a scripted parameter that checks if FME_SHAREDRESOURCE_DATA exists. If not, you could return FME_MF_DIR instead, which is the directory where the workspace is saved.

 

 

David

fmelizard
Safer
Forum|alt.badge.img+22
  • Author
  • Safer
  • Feb 25, 2015 3:19 PM UTC
The FME_SHAREDRESOURCE_DATA would not exist since it is run locally, and the FME_MF_DIR is not an option since I dont want to make the file locally available.

 

If it would just be possible to access it with an HTTPCaller.....then I could query the contents in midtranslation, is it at all possible?

david_r
Celebrity
  • Best Answer
  • Feb 26, 2015 9:09 AM UTC
No sure if the shared resource files are directly accessible via HTTP on FME Server. But you could of course publish a simple workspace on the cloud that returns your resource file over HTTP.

 

 

David

fmelizard
Safer
Forum|alt.badge.img+22
  • Author
  • Safer
  • Feb 26, 2015 12:08 PM UTC
and I did just that, thanks for setting me on the right path....

sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • Feb 26, 2015 12:41 PM UTC
What about using the FMEREST API to download the resource via the HTTPCaller? 

 

http://docs.safe.com/fmerest/v2/resources/FME_SHAREDRESOURCE_TEMP/filesys/foo/bar?detail=low 

fmelizard
Safer
Forum|alt.badge.img+22
  • Author
  • Safer
  • Feb 26, 2015 12:49 PM UTC
Hi SigTill,

 

If I understand you correctly that will result in a local copy of the resource file, something I am trying to avoid.

 

I followed David's suggestion and created a ws that is registered to the data streaming service. Now I can access the online file without a local copy.