Support Questions

Find answers, ask questions, and share your expertise

Data flow enrichment with NiFi : LookupRecord with RestLookupService

avatar
Contributor

 

I have gone through data enrichment article using Simple KV lookup service.

 

SimpleKeyValueLookupService reference url

https://community.cloudera.com/t5/Community-Articles/Data-flow-enrichment-with-NiFi-part-1-LookupRec...

 

Can the same be achieved by using RestLookupService  ?  If yes, what format of data should the api return (equivalent to key value pairs)?  

1 REPLY 1

avatar
Explorer

Yes, you can achieve the same lead data enrichment  using the RestLookupService. The format of the data that the API should return depends on the specific requirements of your use case, but it typically should be in a format that can be easily processed and integrated into your data flow.
For example, if you are looking to perform simple key-value lookups, the API could return data in JSON format with a structure similar to the following:
{
"key1": "value1",
"key2": "value2",
...
}
You can then use the values returned from the API to update or add fields in your data flow by mapping the keys in the API response to fields in your data.
It's important to note that the RestLookupService can handle a variety of data formats, including JSON, XML, or even plain text. The choice of format depends on the specific requirements of your use case and the capabilities of the API you are using.