Feed an Http caller values from one column using another column as identifier or pk

  • 29 March 2024
  • 4 replies

Badge +1

Hello everyone,

I'm currently in the process of learning FME as it's just been introduced into our projects. However, there's not much guidance available at the moment, so I'm hoping to get some help here.

I have a specific task involving two values: Owner ID (OID) and associated account (AA). We have our own API service that can provide additional details using the AA. My aim is to make HTTP calls with the AA values while ensuring the control remains based on OID.

DATA format example:

In simpler terms, when OID is set to 1, I want to input all associated AA values into the caller (one by one of course).

However, I've heard that loops aren't generally recommended in FME workflows.

Can anyone advise if this is possible within FME, and if so, how I might go about it without resorting to loops?

Any insights or guidance would be greatly appreciated.

Thank you in advance!



Best answer by hkingsbury 2 April 2024, 03:13

View original

4 replies

Userlevel 5
Badge +29

Correct re looping that it often isn’t best to do and can often be done in another way that doesn’t require looping. In your case, no looping is needed :)

at a high level (changes when you dive a bit deeper) FME process one feature at a time so when a feature gets passed to an HTTPCaller, it will perfrom the call triggered by that feature, then a second arrives, it will do a second call etc.

To split off/filter your features with an OID of 1, you can use a Tester or a TestFilter. The former only provides a pass/fails, while the latter allows you to have multiple conditions and multiple output ports

Badge +1

Thank you for your answer @hkingsbury

I tackled the issue in a different way. First, I used the feature reader to access my file and then pointed to an attribute manager to focus solely on the AA. Next, I connected this setup to an HTTP caller to retrieve additional details and organized the data downstream based on unique attributes.

Regarding the TestFilter option i would mention that my OID isn't just a number, I opted to simplify the data for the sake of this example, making it impractical to treat it as a simple incrementation. Maybe I'll look into it further later on, for now I achieved something similar to what I visioned.

Userlevel 5
Badge +29

The tester and testfilter conditions can also be string based

Badge +1

Actually I tried it once more and it does filter as I want it to be so thanks again @hkingsbury