[
https://issues.apache.org/jira/browse/NIFI-8070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243551#comment-17243551
]
ASF subversion and git services commented on NIFI-8070:
-------------------------------------------------------
Commit d84583690f9323932cce851679770dea9d7a435f in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d845836 ]
NIFI-8070: Added coalesce function to RecordPath
> 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
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)