You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Anders (Jira)" <ji...@apache.org> on 2024/07/29 09:29:00 UTC

[jira] [Updated] (NIFI-13591) Honor newline in JSLTTransformJSON

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

Anders updated NIFI-13591:
--------------------------
    Description: 
JsonRecordSetWrite has an option for Output Grouping. Either array or "One Line Per Object" (jsonlines), where the jsonlines output is a fairly common usecase.

The JSLTTransformJSON processor has a setting for Transformation Strategy:

"Each JSON Object"
This works on each json object in an array, and works as expected.

"Entire Flowfile"
This sort-of works with the jsonlines files, and each json object gets transformed. However, it strips the newline, so the flowfile just becomes one lone line with all the objects one after the other.

{code}
{..}
{..}
{..}
{..}
{code}
becomes
{code}
{..} {..} {..} {..}
{code}

It would be useful if the newline was presereved. Either by changing the "Entire FlowFile" behaviour, or adding some new setting.

  was:
JsonRecordSetWrite has an option for Output Grouping. Either array or "One Line Per Object" (jsonlines), where the jsonlines output is a fairly common usecase.

The JSLTTransformJSON processor has a setting for Transformation Strategy:

"Each JSON Object"
This works on each json object in an array, and works as expected.

"Entire Flowfile"
This sort-of works with the jsonlines files, and each json object gets transformed. However, it strips the newline, so the flowfile just becomes one lone line with all the objects one after the other.

It would be useful if the newline was presereved. Either by changing the "Entire FlowFile" behaviour, or adding some new setting.


> Honor newline in JSLTTransformJSON
> ----------------------------------
>
>                 Key: NIFI-13591
>                 URL: https://issues.apache.org/jira/browse/NIFI-13591
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.27.0
>            Reporter: Anders
>            Priority: Minor
>
> JsonRecordSetWrite has an option for Output Grouping. Either array or "One Line Per Object" (jsonlines), where the jsonlines output is a fairly common usecase.
> The JSLTTransformJSON processor has a setting for Transformation Strategy:
> "Each JSON Object"
> This works on each json object in an array, and works as expected.
> "Entire Flowfile"
> This sort-of works with the jsonlines files, and each json object gets transformed. However, it strips the newline, so the flowfile just becomes one lone line with all the objects one after the other.
> {code}
> {..}
> {..}
> {..}
> {..}
> {code}
> becomes
> {code}
> {..} {..} {..} {..}
> {code}
> It would be useful if the newline was presereved. Either by changing the "Entire FlowFile" behaviour, or adding some new setting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)