Skip to main content

A Rest query resulted to a JSON result which includes a URL to another JSON file from the host server. I want to download that JSON URL so I can save it on my computer and then read it as well.

For some reason just passing the URL from the JSON flattener and configuring the dataset of the FeatureReader with Format: JSON with that url attribute is not working.

It would be good to just implement this with FME Server as a download service but right now I'm limited to Desktop. At the very least I want to read the JSON from the server and it's also not working either.

I tried File Copy Writer by parsing the json filename on the URL and it did not work either.

Hi @salvaleonrp,

Are there any errors or warnings reported in the translation log?

If you copy and paste the URL into the web browser does it download the file successfully?

Does the URL allow for unauthenticated access? If no you may need to use the HTTPCaller to download the file before reading it in.


Firstly check if the JSONFlattener works as you expected. Connect an Inspector to the JSONFlattener instead of the FeatureReader and run. Is the URL retrieved correctly?


Hi @salvaleonrp,

Are there any errors or warnings reported in the translation log?

If you copy and paste the URL into the web browser does it download the file successfully?

Does the URL allow for unauthenticated access? If no you may need to use the HTTPCaller to download the file before reading it in.

Q1: No errors or warnings.

Q2: Yes.

Q3: Authentication is not required.

As suggested, I used the HTTPCaller and it solved my problem.

 

Pretty cool to see the JSON return from the HTTP caller. With a TextFile writer from the output port of the HTTPCaller, I can now save a copy of the JSON to my computer and now work on my JSON to continue translation.

 

Thanks!

Reply