[
https://issues.apache.org/jira/browse/NIFI-9677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Molnar updated NIFI-9677:
-------------------------------
Description:
Input JSON generated by GenerateFlowFile processor looks like this (actually I
just added a currencies array under each record in addition to the "Record
Update Strategy - Replace Existing Values" example here
[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).]
*Note:* for the first record currencies array is empty.
{code:java}
[
{
"locales": [
{
"region": "FR",
"language": "fr"
}, {
"region": "US",
"language": "en"
}
],
"currencies": []
}, {
"locales": [
{
"region": "CA",
"language": "fr"
},
{
"region": "JP",
"language": "ja"
}
],
"currencies": [
{
"currency": "CAD"
}, {
"currency": "JPY"
}
]
}
]{code}
SimpleKeyValueLookUp service contains the following values:
!image-2022-02-11-12-33-23-283.png!
LookUpRecord processor is configured as follows:
!image-2022-02-11-12-30-53-134.png!
Once I execute the LookUpRecord processor for the flow file, language look up
works fine, but the look up for currencies and regions look up does not work.
!image-2022-02-11-12-32-01-833.png!
*Note:* in case the 1st currencies array is not empty but contains \{
"currency": "EUR" }, \{ "currency": "USD" }, all look up works fine. But a
missing data seems to break the next evaluation of the record path.
Please find the template for reproducing the issue enclosed as
"LookUpRecord_empty_array_data_issue.xml".
Thank you.
was:
Input JSON generated by GenerateFlowFile processor looks like this (actually I
just added a currencies array under each record in addition to the "Record
Update Strategy - Replace Existing Values" example here
[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).]
*Note:* for the first record currencies array is empty.
{code:java}
[
{
"locales": [
{
"region": "FR",
"language": "fr"
}, {
"region": "US",
"language": "en"
}
],
"currencies": []
}, {
"locales": [
{
"region": "CA",
"language": "fr"
},
{
"region": "JP",
"language": "ja"
}
],
"currencies": [
{
"currency": "CAD"
}, {
"currency": "JPY"
}
]
}
]{code}
SimpleKeyValueLookUp service contains the following values:
!image-2022-02-11-12-33-23-283.png!
LookUpRecord processor is configured as follows:
!image-2022-02-11-12-30-53-134.png!
Once I execute the LookUpRecord processor for the flow file, language look up
works fine, but the look up for currencies and regions look up does not work.
!image-2022-02-11-12-32-01-833.png!
*Note:* in case the 1st currencies array is not empty but contains \{
"currency": "EUR" }, \{ "currency": "USD" }, all look up works fine. But a
missing data seems to break the next evaluation of the record path.
Please find the template for reproducing the issue enclosed.
Thank you.
> LookUpRecord record path evaluation is "breaking" the next evaluation in case
> data is missing
> ---------------------------------------------------------------------------------------------
>
> Key: NIFI-9677
> URL: https://issues.apache.org/jira/browse/NIFI-9677
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.16.0
> Environment: Apache NiFi custom built from Github repo.
> Reporter: Peter Molnar
> Priority: Major
> Attachments: LookUpRecord_empty_array_data_issue.xml,
> image-2022-02-11-12-30-53-134.png, image-2022-02-11-12-32-01-833.png,
> image-2022-02-11-12-33-23-283.png
>
>
> Input JSON generated by GenerateFlowFile processor looks like this (actually
> I just added a currencies array under each record in addition to the "Record
> Update Strategy - Replace Existing Values" example here
> [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).]
> *Note:* for the first record currencies array is empty.
>
> {code:java}
> [
> {
> "locales": [
> {
> "region": "FR",
> "language": "fr"
> }, {
> "region": "US",
> "language": "en"
> }
> ],
> "currencies": []
> }, {
> "locales": [
> {
> "region": "CA",
> "language": "fr"
> },
> {
> "region": "JP",
> "language": "ja"
> }
> ],
> "currencies": [
> {
> "currency": "CAD"
> }, {
> "currency": "JPY"
> }
> ]
> }
> ]{code}
>
> SimpleKeyValueLookUp service contains the following values:
> !image-2022-02-11-12-33-23-283.png!
>
> LookUpRecord processor is configured as follows:
> !image-2022-02-11-12-30-53-134.png!
> Once I execute the LookUpRecord processor for the flow file, language look up
> works fine, but the look up for currencies and regions look up does not work.
>
> !image-2022-02-11-12-32-01-833.png!
> *Note:* in case the 1st currencies array is not empty but contains \{
> "currency": "EUR" }, \{ "currency": "USD" }, all look up works fine. But a
> missing data seems to break the next evaluation of the record path.
> Please find the template for reproducing the issue enclosed as
> "LookUpRecord_empty_array_data_issue.xml".
> Thank you.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)