Skip to main content
Best Answer

How to set the reader source URL dynamicaly

  • August 6, 2019
  • 2 replies
  • 16 views

I need to read a GeoJson from an URL. One of the attributes of the call is the current time that I could get using the "Date/Time Functions" on Text Editor, however those functions are note available in the reader.

I tried to use a FeatureReader where I can set the current time properly but then I don't have the "Network Authentication" options under parameters.

 

Any clue on how to set the reader source GeoJSON URL dynamicaly?

Best answer by ebygomm

You could use a scripted private parameter for the reader source,  something like this where 'url' is a parameter that contains the fixed part of the url

from time import strftime
return FME_MacroValues['url']+strftime("%Y%m%d-%H%M%S")

 

 

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

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • August 6, 2019

You could use a scripted private parameter for the reader source,  something like this where 'url' is a parameter that contains the fixed part of the url

from time import strftime
return FME_MacroValues['url']+strftime("%Y%m%d-%H%M%S")

 

 


  • Author
  • August 6, 2019

You could use a scripted private parameter for the reader source,  something like this where 'url' is a parameter that contains the fixed part of the url

from time import strftime
return FME_MacroValues['url']+strftime("%Y%m%d-%H%M%S")

 

 

Thank you so much. Exactly what I needed.