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 2020/12/03 21:06:00 UTC
[jira] [Updated] (NIFI-8070) Add a coalesce function to RecordPath
[ https://issues.apache.org/jira/browse/NIFI-8070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Payne updated NIFI-8070:
-----------------------------
Fix Version/s: 1.13.0
Status: Patch Available (was: Open)
> Add a coalesce function to RecordPath
> -------------------------------------
>
> Key: NIFI-8070
> URL: https://issues.apache.org/jira/browse/NIFI-8070
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.13.0
>
>
> There are times when it is necessary to extract one of a few different fields from a Record, whichever is not null. We should add a coalesce function, similar to the analog in SQL, that will return the first non-null value in a sequence of arguments. For example, given the JSON:
> {code:java}
> {
> "id": "1234",
> "name": null
> }{code}
> The path `coalesce(/id, /name)` should return the `id` field. But given the JSON:
> {code:java}
> {
> "id": null,
> "name": "John Doe"
> }{code}
> The same path should return the `name` field.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)