[ https://issues.apache.org/jira/browse/NIFI-12121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17785001#comment-17785001 ]
ASF subversion and git services commented on NIFI-12121: -------------------------------------------------------- Commit bfe97dc321d34412fe632b1040221487525ea0f4 in nifi's branch refs/heads/support/nifi-1.x from Michael W Moser [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=bfe97dc321 ] NIFI-12121 Added Transform Result Filter to JSLTTransformJSON This closes #7922 Signed-off-by: David Handermann <exceptionfact...@apache.org> (cherry picked from commit 832d4455c19d3271735b90b6b4f27a32465fa8e7) > Update JSLTTransformJSON to output null-value JSON objects > ---------------------------------------------------------- > > Key: NIFI-12121 > URL: https://issues.apache.org/jira/browse/NIFI-12121 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Affects Versions: 1.23.2 > Reporter: Nick dos Remedios > Assignee: Michael W Moser > Priority: Minor > Fix For: 2.latest > > Time Spent: 1h 40m > Remaining Estimate: 0h > > The current implementation of the JSLTTransformJSON processor is configured > using the default {{com.schibsted.spt.data.jslt.Parser}} "filter" > configuration that results in the removal of any JSON objects where the value > is `null`. > When processing data in Nifi with the "infer schema" option for a > reader/writer controller service, this results in some {*}data not conforming > to the "original" schema{*}, once it passed through the JSLTTransformJSON > processor. As any JSON objects with a null value are removed from the final > JSON output. See [this issue|https://github.com/schibsted/jslt/issues/308] > that illustrates this problem. > The [JSLT API allows for the ability to > configure|https://github.com/schibsted/jslt/blob/master/docs/api.md#object-key-filter] > whether null-value objects are retained or remove. I've checked the Nifi > JSLTTransformJSON source and it does not currently set > {{.withObjectFilter(filter)}} on the {{Parse}} object. > I'd like to see the JSLTTransformJSON processor be updated with a > user-selectable option to include null-value objects in the output (or not). > Which would optionally set {{{}Parser.withObjectFilter(true){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)