[ 
https://issues.apache.org/jira/browse/NIFI-15274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124929#comment-18124929
 ] 

Jens M Kofoed commented on NIFI-15274:
--------------------------------------

[~sejal0301], that is certainly still relevant. It would allow replacing 
multiple LookupAttribute processors with a single one.
The idea behind it was that you might need to enrich a FlowFile with multiple 
fields from the same lookup service, yet perhaps wish to use different existing 
keys to retrieve different key-value pairs from that service.
With SimpleDatabaseLookupService, you are currently limited to performing a 
lookup in one specific column and returning the value from another column.

I am not sure what the best approach would be. With the current combination of 
the LookupAttribute processor and SimpleDatabaseLookupService, you can only 
specify one column for the lookup and return a value from one column.

LookupAttribute
Attribute Name: myNewAttribute
Value: The value to be looked up

SimpleDatabaseLookupService:
Lookup Key Column: The name of the column where the "VALUE" from 
"myNewAttribute" is to be found
Lookup Value Column: The name of the column where the return value for 
"myNewAttribute" is to be found

A change would affect both the processor and the service, enabling the creation 
of multiple dynamic attributes and the retrieval of values ​​from multiple 
columns. However, I do not know exactly how that would be implemented.

> Lookup multiple attributes
> --------------------------
>
>                 Key: NIFI-15274
>                 URL: https://issues.apache.org/jira/browse/NIFI-15274
>             Project: Apache NiFi
>          Issue Type: New Feature
>    Affects Versions: 2.6.0
>            Reporter: Jens M Kofoed
>            Priority: Major
>
> The LookupAttribute processor allows you to lookup one key and set only one 
> dynamic attribute to a value received from the lookup service.
> It would be nice if it would be possible to set multiple dynamic attributes.
> This request will effect both a new LookupMultipleAttribute processor but 
> also the lookup services which should be able to return multiple values.
> A suggestion could might be something like this:
> Attribute name: keyfield - value=(keyfield in lookupservice)
> Attribute name: keyvalue - value=(the value you which to find in the keyfield)
> Dynamic attributes:
> Dynamic attribute values could be the return fieldname from the lookup 
> service eg:
> myAttribute1: field_X (return value from field_X)
> myAttribute2: field_Y (return value from field_Y)
> myAttribute3: field_Z (return value from field_Z)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to