Mark Payne created NIFI-12773:
---------------------------------

             Summary: Add 'join' and 'anchored' RecordPath functions
                 Key: NIFI-12773
                 URL: https://issues.apache.org/jira/browse/NIFI-12773
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne
             Fix For: 2.0.0


I've come across two functions that would make flow design much simpler in 
RecordPath.

The first one, 'join' would be similar to the 'concat' method but provides a 
delimiter between each element instead of just smashing the values together.

The other provides the ability to anchor the context node while evaluating a 
RecordPath. For example, given the following record:
{code:java}
{
    "id": "1234",
    "elements": [{
        "name": "book",
        "color": "red"
    }, {
        "name": "computer",
        "color": "black"
    }]
} {code}
We should be able to use:
{code:java}
anchored(/elements, concat(/name, ': ', /color)) {code}
In order to obtain an array of 2 elements:
{code:java}
book: red {code}
and
{code:java}
computer: black {code}
 



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

Reply via email to