[ 
https://issues.apache.org/jira/browse/NIFI-9781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503765#comment-17503765
 ] 

ASF subversion and git services commented on NIFI-9781:
-------------------------------------------------------

Commit 6a1c7c72d5b91b9ce5d5cb5b86e3155d21e2c19b in nifi's branch 
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=6a1c7c7 ]

NIFI-9781: Fix handling when selecting array element via QueryRecord

Signed-off-by: Joe Gresock <[email protected]>

This closes #5853.


> 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
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to