[
https://issues.apache.org/jira/browse/NIFI-13380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Payne updated NIFI-13380:
------------------------------
Description:
If I have a record along the lines of:
{code:java}
{
"people": [{
"name": "John Doe",
"age": 30,
"siblings": [{
"sister": {
"name": "Jane Doe",
"extraInfo": {}
}
}]
}]
} {code}
I use UpdateRecord to update {{//sister[./name = 'Jane Doe']/extraInfo/title}}
to a value of {{Dr.}} but the output is unchanged.
It seems that the schema that is inferred has a lot of complex CHOICE types, as
the 'extraInfo' may now have a 'title' or not. And the RECORD type of the
siblings array has a CHOICE as a result, and so on.
was:
If I have a record along the lines of:
{code:java}
{
"people": [{
"name": "John Doe",
"age": 30,
"siblings": [{
"name": "Jane Doe"
}]
}]
} {code}
When I use a RecordPath of {{//name}} I should get back 2 names: {{John Doe}}
and {{Jane Doe}} but I don't get any back. This is because the {{//}} operator
does not appear to recurse into arrays of Records.
> UpdateRecord sometimes not working when schema is complex
> ---------------------------------------------------------
>
> Key: NIFI-13380
> URL: https://issues.apache.org/jira/browse/NIFI-13380
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
>
> If I have a record along the lines of:
> {code:java}
> {
> "people": [{
> "name": "John Doe",
> "age": 30,
> "siblings": [{
> "sister": {
> "name": "Jane Doe",
> "extraInfo": {}
> }
> }]
> }]
> } {code}
> I use UpdateRecord to update {{//sister[./name = 'Jane
> Doe']/extraInfo/title}} to a value of {{Dr.}} but the output is unchanged.
> It seems that the schema that is inferred has a lot of complex CHOICE types,
> as the 'extraInfo' may now have a 'title' or not. And the RECORD type of the
> siblings array has a CHOICE as a result, and so on.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)