Skip to main content
Question

Can I start a reader with a choice of 2 input files location?

  • February 15, 2019
  • 5 replies
  • 26 views

tschoppenhof
Contributor
Forum|alt.badge.img+7

As an additional source for a transformation I need an xml-File with a given name. This file can be located online (url-adress). If its not online the XML-Reader should use a local file (with the same name). How can I implement this in a Workspace?

 

Thanks for your help

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.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • February 15, 2019

You could use the FeatureReader instead of the XML reader.

That way you have an option to manipulate the file name before getting to that transformer.

You could use the FileExistenceChecker (a tranformer available on the FME Hub) to see if the XML file is available online.

Hope this helps.


tschoppenhof
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 18, 2019

You could use the FeatureReader instead of the XML reader.

That way you have an option to manipulate the file name before getting to that transformer.

You could use the FileExistenceChecker (a tranformer available on the FME Hub) to see if the XML file is available online.

Hope this helps.

I tried the FileExistenceChecker but it seems that it can not check url adresses. I didn't recognize an url-Adress that the xml-Reader is able to read. Any Idea what the problem could be? Test_FEC.fmw


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • February 18, 2019

I tried the FileExistenceChecker but it seems that it can not check url adresses. I didn't recognize an url-Adress that the xml-Reader is able to read. Any Idea what the problem could be? Test_FEC.fmw

Why not just use a http caller to check for the existence of the file?


nielsgerrits
VIP
Forum|alt.badge.img+64

Or use the HttpCaller to hit the XML adres. If Rejected then initiate a FeatureReader with the local file.

dynamicreadsample.fmwt


tschoppenhof
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 18, 2019

Or use the HttpCaller to hit the XML adres. If Rejected then initiate a FeatureReader with the local file.

dynamicreadsample.fmwt

Your Input helped a lot, thank you very much.