NIFI-7686: Support multiple key columns in database lookup services#11188
Open
lhapollo wants to merge 1 commit intoapache:mainfrom
Open
NIFI-7686: Support multiple key columns in database lookup services#11188lhapollo wants to merge 1 commit intoapache:mainfrom
lhapollo wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Added composite key support to DatabaseRecordLookupService and SimpleDatabaseLookupService. When LOOKUP_KEY_COLUMN contains a comma-separated list of column names, the services build a composite WHERE clause and expect coordinates keyed by column name instead of the single 'key' coordinate. Includes type coercion so String values from LookupRecord are converted to the correct SQL types based on ParameterMetaData. Backward compatible: single-key behavior is unchanged.
Contributor
|
@lhapollo It looks like there are Checkstyle and PMD violations in the two builds that are failing. Please correct those. |
exceptionfactory
requested changes
May 2, 2026
Contributor
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for proposing this new feature @lhapollo. On initial review, this change introduces notable behavior changes, and has duplicative logic for things like coercing values. Expanding the semantic behavior of the Lookup Key Column property is also potentially confusing, so at minimum, it would require renaming the property. For all of these reasons, I think the approach needs closer consideration. It may warrant a different service implementation, rather than changes to the existing implementations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NIFI-7686
Added composite key support to DatabaseRecordLookupService and SimpleDatabaseLookupService. When LOOKUP_KEY_COLUMN contains a comma-separated list of column names, the services build a composite WHERE clause and expect coordinates keyed by column name instead of the single 'key' coordinate.
Includes type coercion so String values from LookupRecord are converted to the correct SQL types based on ParameterMetaData.
Backward compatible: single-key behavior is unchanged.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation