Mark Payne created NIFI-8070: -------------------------------- Summary: 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
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)