You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Forrester (JIRA)" <ji...@apache.org> on 2018/04/18 15:16:00 UTC

[jira] [Updated] (NIFI-5093) ConvertAvroToJson

     [ https://issues.apache.org/jira/browse/NIFI-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Forrester updated NIFI-5093:
---------------------------------
    Description: 
ConvertAvroToJson with the options
 * JSON Container Options: None
 * Wrap Single Record: False

Given 1+ Avro records from ExecuteSQL it creates a newline delimited list of object, which is great (and looks like [http://ndjson.org/)]

Given 0 records it creates a list of one empty object.

This is not helpful as any downstream processor which is expecting JSON with specific fields will fail.

NDJSON is cool as it's a streamable format and we should enable easy usage.

To be fair, this is all documented but it's rather strange. An NDJSON file with no records should be zero probably be zero bytes in length.

  was:
ConvertAvroToJson with the options
 * JSON Container Options: None
 * Wrap Single Record: False

Given 1+ Avro records from ExecuteSQL it creates a newline delimited list of object, which is great (and looks like [http://ndjson.org/)]

Given 0 records it creates a list of one empty object.

This is just strange as any downstream processor which is expecting JSON with specific fields will fail.

NDJSON is cool as it's a streamable format and we should enable easy usage.


> ConvertAvroToJson
> -----------------
>
>                 Key: NIFI-5093
>                 URL: https://issues.apache.org/jira/browse/NIFI-5093
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>         Environment: Ubuntu / Chromium
>            Reporter: Matt Forrester
>            Priority: Minor
>
> ConvertAvroToJson with the options
>  * JSON Container Options: None
>  * Wrap Single Record: False
> Given 1+ Avro records from ExecuteSQL it creates a newline delimited list of object, which is great (and looks like [http://ndjson.org/)]
> Given 0 records it creates a list of one empty object.
> This is not helpful as any downstream processor which is expecting JSON with specific fields will fail.
> NDJSON is cool as it's a streamable format and we should enable easy usage.
> To be fair, this is all documented but it's rather strange. An NDJSON file with no records should be zero probably be zero bytes in length.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)