Support Questions

Find answers, ask questions, and share your expertise

LookupAttibute Example

avatar
Rising Star

I'm hoping someone can point me in the right direction. I have a SimpleKeyValueLookupService configured with some sample type I'm attempting to lookup. The way I understand it so far (from all the searches I've done) is in the LookUpAttribute I create a Dynamic Property of 'key' and set it's value to be in my case ${column_name}. So my question is where does the result get returned into?

1 ACCEPTED SOLUTION

avatar

@Hans FeldmannThe best thing to explain this is to take an example. Let's say that you want to add an attribute city with a SimpleKVLookupService. And you will be doing the lookup by an attribute id_store (look at this article to understand the logic behind this use case).

You need to configure LookupAttribute as follows:

39696-screen-shot-2017-10-07-at-93120-am.png

This means that the processor will use the value of the attribute id_store as a key and query the lookupservice. the returned value will be added as an attribute city. Here's the result:

39697-screen-shot-2017-10-07-at-93414-am.png

Of course, the flow file should have the attribute id_store before going in LookupAttribute.

And here's the content of the SimpleKVLookupService

39698-screen-shot-2017-10-07-at-93741-am.png

I hope this helps

View solution in original post

1 REPLY 1

avatar

@Hans FeldmannThe best thing to explain this is to take an example. Let's say that you want to add an attribute city with a SimpleKVLookupService. And you will be doing the lookup by an attribute id_store (look at this article to understand the logic behind this use case).

You need to configure LookupAttribute as follows:

39696-screen-shot-2017-10-07-at-93120-am.png

This means that the processor will use the value of the attribute id_store as a key and query the lookupservice. the returned value will be added as an attribute city. Here's the result:

39697-screen-shot-2017-10-07-at-93414-am.png

Of course, the flow file should have the attribute id_store before going in LookupAttribute.

And here's the content of the SimpleKVLookupService

39698-screen-shot-2017-10-07-at-93741-am.png

I hope this helps