Question

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

  • 15 February 2019
  • 5 replies
  • 0 views

Badge +6

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


5 replies

Userlevel 2
Badge +12

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.

Badge +6

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

Badge +10

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?

Userlevel 6
Badge +31

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

dynamicreadsample.fmwt

Badge +6

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.

Reply