Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
1.15.0
-
None
-
apache/nifi:1.15.0 official docker image
Description
I tried to use the LookUpRecord processor with the example shown on https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.15.0/org.apache.nifi.processors.standard.LookupRecord/additionalDetails.html page under "Record Update Strategy - Replace Existing Values" section.
In the Simple Key Value Lookup Service I defined the following key-value pairs (Note: that FR key is missing on purpose):
- US => United States
- CA => Canada
I created a GenerateFlowFile processor to create a file with the following content:
[
{
"locales": [
,
{ "region": "US", "language": "en" } ]
}, {
"locales": [
,
]
}
]
The LookUpRecord is configured as follows:
JsonTreeReader and JsonRecordSetWriter are just configured with infer and inherit schema.
Once LookUpRecord is executed, "US" values is not looked up and replaced. The reason for this since "FR" cannot be looked up, line 343 in LookUpRecord.java (https://github.com/apache/nifi/blob/7fe8858d22f580ad9dcd96ebafb59dbe5e73f5cb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LookupRecord.java#L341) returns before attempting to look up the "US" value.
I would expect that in this case "US" is still looked up regardless if "FR" key can be looked up or not.
Please find enclosed the NiFi template for reproducing the issue.
Attachments
Attachments
Issue Links
- links to