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

Matt Burgess commented on NIFI-6082:
------------------------------------

The way it's designed, we'd need a separate service for that. 
DatabaseRecordLookupService is more like CSVRecordLookupService, as its use 
case is to match a key in the DB and bring back a bunch of columns (as a record 
or individual fields). LookupAttribute doesn't support CSVRecordLookupService; 
instead there's a separate SimpleCsvFileLookupService to get a single String 
value from the lookup. So all the simple one-key-one-value lookup services 
(i.e. StringLookupService implementations) can be used in both processors but 
only to get the single value. RecordLookupService implementations (like 
CSVRecordLookupService and DatabaseRecordLookupService) cannot be used in 
LookupAttribute, but can return multiple fields.

I'll take a look at adding a SimpleDatabaseLookupService to this PR, otherwise 
we could add it later.

> Create a Database LookupService
> -------------------------------
>
>                 Key: NIFI-6082
>                 URL: https://issues.apache.org/jira/browse/NIFI-6082
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The contribution for NIFI-3404 was originally intended to include a 
> DatabaseLookupService, but due to various reasons it was excluded from the 
> final PR that was merged.
> This Jira proposes to add a DatabaseLookupService controller service, where 
> values can be retrieved from an external RDBMS (through the use of a 
> DBCPService). Design considerations include which key(s) to accept, whether 
> to locally cache no/some/all queries, result sets, etc. The major requirement 
> is to be able to enrich record-based flow file values (via LookupRecord) from 
> an external RDBMS source.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to