Hi Ryan,

With following settings:

# LookupAttribute
(+dynamic) lookedUp=${someAttribute}

# SimpleCsvFileLookupService
CSV File=data.csv
Lookup Key Column=id
Lookup Value Column=value

# data.csv
id,value,desc
one,1,the first number
two,2,the 2nd number

If a FlowFile having 'someAttribute' attribute as 'two' is processed
by LookupAttribute
then the FlowFile will have additional 'lookedUp' attribute as '2'.

Unfortunately, LookupAttribute can only lookup a single value at a
time. You can only lookup 'value' or 'desc' with the above example,
not both.
In order to lookup multiple values, LookupRecord may be helpful. But
it enrich FlowFile content instead of attributes.

Hope this helps.

Thanks,
Koji
On Tue, Dec 18, 2018 at 3:54 AM Ryan Hendrickson
<ryan.andrew.hendrick...@gmail.com> wrote:
>
> Hi all,
>    I'm trying to use the SimpleCsvFileLookupService with the LookupAttribute 
> processor.  I'm having some trouble understanding what the Controller Service 
> is doing with the Lookup Key/Value attributes and what the LookupAttribute is 
> doing with the Dynamic Files.
>
>    Ultimately, I have a CSV file with an alphanumeric ID in it, I want to key 
> off-of that field, and return back the others in the row, all as nifi 
> attributes.
>
> Thanks,
> Ryan

Reply via email to