Skip to main content

Hi, all.

I'm trying to pull a couple of dozen JSON files into FME with an API through flightaware.com, so that I can build flight tracks, based on the unique flight_id of each flight.

I built a python script today that accomplishes the objective and saves all of the separate JSONs into one JSON, locally. With some help, I figured out how to pull that JSON into a couple of fragmenters and have been going from there. So, ultimately, I have the option of continuing to run the script separately from the FME session, but I was curious if anyone knows how to integrate an independent Python script into the workflow. Python caller hasn't worked for me, I assume because it's designed to process features not save files locally.

 

Also, I didn't use the http caller because the URL request was done per flight id, so I decided I'd need 20 callers running simultaneously. Is that a correct assumption, or is there way of iterating through a list to fill in the URL request multiple times?

 

Thanks!

HTTPCaller is the correct transformer to use.

 

You'll need one feature per Flight ID with the Flight ID stored as an attribute. The HTTPCaller will then need to be configured to use the attribute in the HTTP Call that is made


I can pass multiple Request URL's through a single instance of HTTP Caller? Do you know where I can find an example of that?

 

Thanks for the help!


I can pass multiple Request URL's through a single instance of HTTP Caller? Do you know where I can find an example of that?

 

Thanks for the help!

Every feature that runs through a HTTPCaller will result in a single HTTP call being made, so if you have 20 features each with a unique flight id you can use one HTTPCaller to make those 20 calls. However, you may want to use a Decelerator beforehand to slow things down a bit (many API's and web services can't handle a lot of simultaneous requests)


Perfect. Thank you both!


Reply