You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2022/03/09 16:03:00 UTC
[jira] [Created] (NIFI-9781) When selecting an array column in QueryRecord, it may return an array of STRINGs when it should be an array of records
Mark Payne created NIFI-9781:
--------------------------------
Summary: When selecting an array column in QueryRecord, it may return an array of STRINGs when it should be an array of records
Key: NIFI-9781
URL: https://issues.apache.org/jira/browse/NIFI-9781
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Reporter: Mark Payne
Assignee: Mark Payne
Given the following input:
{code:java}
{
"name": "John Doe",
"title": "Software Engineer",
"age": 40,
"addresses": [{
"streetNumber": 4820,
"street": "My Street",
"apartment": null,
"city": "New York",
"state": "NY",
"country": "USA",
"label": "work"
}, {
"streetNumber": 327,
"street": "Small Street",
"apartment": 309,
"city": "Los Angeles",
"state": "CA",
"country": "USA",
"label": "home"
}],
"project": {
"name": "Apache NiFi",
"maintainer": {
"id": 28302873,
"name": "Apache Software Foundation"
},
"debutYear": 2014
}
} {code}
If I use the following query:
{code:java}
SELECT addresses FROM FLOWFILE {code}
I expect to get the output:
{code:java}
{
"addresses" : [ {
"streetNumber" : 4820,
"street" : "My Street",
"apartment" : null,
"city" : "New York",
"state" : "NY",
"country" : "USA",
"label" : "work"
}, {
"streetNumber" : 327,
"street" : "Small Street",
"apartment" : 309,
"city" : "Los Angeles",
"state" : "CA",
"country" : "USA",
"label" : "home"
} ]
} {code}
But instead the {{addresses}} field is something like {{MapRecord[streetNumber=4820, street=My Street...]}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)