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

[jira] [Commented] (NIFI-10245) Implement SuperCSV's StrReplace function in the ValidateCsv Processor

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

Mark Payne commented on NIFI-10245:
-----------------------------------

[~john.wise] I would recommend using UpdateRecord for this. Add a property name of {{/*[. = 'None']}}

The interesting part here is getting a null value for that property. To do that, you can set UpdateRecord's "Replacement Value Strategy" property "Record Path Value" and then set the value of your newly added property to something like {{/idonotexist}} so that you point to a nonexistent / null value.

Use a CSV Reader and a JSONRecordSetWriter. So this will handle replacing "None" at the same time as converting from CSV to JSON

> Implement SuperCSV's StrReplace function in the ValidateCsv Processor
> ---------------------------------------------------------------------
>
>                 Key: NIFI-10245
>                 URL: https://issues.apache.org/jira/browse/NIFI-10245
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: John Wise
>            Priority: Trivial
>              Labels: supercsv
>
> We're current processing data which arrives with "None" in place of empty/null values.  Since we don't have a use for those, we'd prefer to drop them prior to JSON conversion.  Because the current implementation doesn't include StrReplace, we have to use a slower ReplaceText processor to do this.



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