Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12773

Add 'join' and 'anchored' RecordPath functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M3
    • Core Framework
    • None

    Description

      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:

      {
          "id": "1234",
          "elements": [{
              "name": "book",
              "color": "red"
          }, {
              "name": "computer",
              "color": "black"
          }]
      } 

      We should be able to use:

      anchored(/elements, concat(/name, ': ', /color)) 

      In order to obtain an array of 2 elements:

      book: red 

      and

      computer: black 

       

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m