You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joe Gresock (Jira)" <ji...@apache.org> on 2022/03/09 18:09:00 UTC
[jira] [Resolved] (NIFI-9781) When selecting an array column in QueryRecord, it may return an array of STRINGs when it should be an array of records
[ https://issues.apache.org/jira/browse/NIFI-9781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Gresock resolved NIFI-9781.
-------------------------------
Fix Version/s: 1.16.0
Resolution: Fixed
> 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
> Fix For: 1.16.0
>
> Time Spent: 20m
> 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)