NIFI-14861 Add EnrichGraphRecord processor#11316
Open
tpalfy wants to merge 2 commits into
Open
Conversation
dan-s1
reviewed
Jun 19, 2026
| throw new IOException("Identifier field(s) not found in record, check the RecordPath expression"); | ||
| } | ||
|
|
||
| final LinkedHashMap<String, Object> identifierFieldNameToValue = new LinkedHashMap<>(identifierFieldValues.size()); |
Contributor
There was a problem hiding this comment.
I believe PMD is complaining that the assignment should be to an interface
Suggested change
| final LinkedHashMap<String, Object> identifierFieldNameToValue = new LinkedHashMap<>(identifierFieldValues.size()); | |
| final Map<String, Object> identifierFieldNameToValue = new LinkedHashMap<>(identifierFieldValues.size()); |
hleonps
suggested changes
Jul 7, 2026
Comment on lines
+422
to
+440
| if (RecordFieldType.ARRAY.equals(rawFieldType)) { | ||
| final DataType arrayElementDataType = ((ArrayDataType) rawDataType).getElementType(); | ||
| if (RecordFieldType.RECORD.getDataType().equals(arrayElementDataType)) { | ||
| final Object[] rawValueArray = (Object[]) rawValue; | ||
| final Object[] mappedValueArray = new Object[rawValueArray.length]; | ||
| for (int index = 0; index < rawValueArray.length; index++) { | ||
| final MapRecord mapRecord = (MapRecord) rawValueArray[index]; | ||
| mappedValueArray[index] = mapRecord.toMap(true); | ||
| } | ||
| return mappedValueArray; | ||
| } | ||
|
|
||
| return rawValue; | ||
| } | ||
|
|
||
| if (RecordFieldType.RECORD.equals(rawFieldType)) { | ||
| final MapRecord mapRecord = (MapRecord) rawValue; | ||
| return mapRecord.toMap(true); | ||
| } |
There was a problem hiding this comment.
Normalization won't work if the record have a nested array. The record could be normalized recursively to avoid the same problem in deeper levels of nesting.
Contributor
Author
There was a problem hiding this comment.
i don't think those scenarios are supported in graph databases.
not in neo4j at least.
Contributor
Author
There was a problem hiding this comment.
on second thought, handling deeply nested values have a particular benefit. while not a useful feature on it's own, it let's us delegate to the underlying database to report it's domain-specifc error instead of crash in nifi.
I'll add it.
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-14861
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation