<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: [Nifi] - Multiple predicate in recordpath filter in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307671#M223300</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67599"&gt;@justenji&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the detailed explanation, this is also what I have tested on my side and in my opinion this does the job being "record oriented" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 15:23:24 GMT</pubDate>
    <dc:creator>stephane_davy</dc:creator>
    <dc:date>2020-12-14T15:23:24Z</dc:date>
    <item>
      <title>[Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306604#M222918</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to use the updateRecord processor to create some fields in my JSON. But I'd like to use some conditions to do that. In the recordpath documentation, I can see that there is a "filter" capability, which works like this: /field[filter]/path, but as far as I can see it's not possible to have multiple conditions in this filter. I'd like to do something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (field1 == A or field1 == B) {

field2 = C

} else if (field1 == D and field1 != E) {
field2 = G
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The example is silly but this is to give you the idea. By the way, except using a script, I don't know how to do that, except may be extracting the fields, put it as attribute and play with expression language but this would mean working with single-record flows and I don't want to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stéphane&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 16:37:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306604#M222918</guid>
      <dc:creator>stephane_davy</dc:creator>
      <dc:date>2020-11-30T16:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306846#M223004</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37461"&gt;@stephane_davy&lt;/a&gt;&amp;nbsp;Maybe you want to give this solution a try?&lt;BR /&gt;Hope the explanation is clear. If not feel free to ask again.&lt;BR /&gt;&amp;lt;Picture removed&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:04:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306846#M223004</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2020-12-03T11:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306854#M223005</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37461"&gt;@stephane_davy&lt;/a&gt;&amp;nbsp;&amp;nbsp; Sorry, my above picture is a kind of vision test...&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow and Step1 and 2" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29674iBFE33B799464D325/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_Multiple predicate in recordpath filter_flow_step1and2.png" alt="Flow and Step1 and 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Flow and Step1 and 2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Step 3 Rule 1" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29675i19513AA05487CAA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_Multiple predicate in recordpath filter_step3_rule1.png" alt="Step 3 Rule 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Step 3 Rule 1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Step 3 Rule 2" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29676i4092A8AD1E431CCC/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_Multiple predicate in recordpath filter_step3_rule2.png" alt="Step 3 Rule 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Step 3 Rule 2&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Step 4" style="width: 744px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29677iAFDF50168C2905C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_Multiple predicate in recordpath filter_step4.png" alt="Step 4" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Step 4&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:01:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/306854#M223005</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2020-12-03T11:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307100#M223083</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67599"&gt;@justenji&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you reply. The problem here is that you are working with attributes and expression language, which would mean to have one flowfile per json object. I'm trying to have a record-oriented flow-file, which means that everything happens with recordpath and / or Jolt transformations. My flow file have multiple JSON records and as such attributes would take multiple values. And I don't want to split my records, this is really resource consuming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stéphane&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 16:37:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307100#M223083</guid>
      <dc:creator>stephane_davy</dc:creator>
      <dc:date>2020-12-07T16:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307143#M223112</link>
      <description>&lt;P&gt;Hello&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37461"&gt;@stephane_davy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry, I haven't seen that record-processing is a "must".&lt;BR /&gt;&lt;BR /&gt;Because I haven't much experience with this kind of syntax I sadly will not be able to help you here.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But if you find a solution just be so kind and show it all of us here.&amp;nbsp;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 07:54:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307143#M223112</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2020-12-08T07:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307174#M223138</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67599"&gt;@justenji&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyway to have taken some time to look after my issue. For now, the only solution I have found is a groovy script.&lt;/P&gt;&lt;P&gt;Stéphane&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:24:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307174#M223138</guid>
      <dc:creator>stephane_davy</dc:creator>
      <dc:date>2020-12-08T16:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307296#M223176</link>
      <description>&lt;P&gt;I need to test this, but actually it seems that the queryRecord is exactly why I need. It is possible to build some complex conditions using SQL-like language on the record content and then perform some routing based on that&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 10:12:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307296#M223176</guid>
      <dc:creator>stephane_davy</dc:creator>
      <dc:date>2020-12-09T10:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307301#M223179</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37461"&gt;@stephane_davy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm working in the same direction because I couldn't believe that there is no possibility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HCC_QueryRecord.PNG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29737i72EB47E517B4B921/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_QueryRecord.PNG" alt="HCC_QueryRecord.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HCC_QueryRecord2.PNG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29738iDDCC171CC25A3484/image-size/large?v=v2&amp;amp;px=999" role="button" title="HCC_QueryRecord2.PNG" alt="HCC_QueryRecord2.PNG" /&gt;&lt;/span&gt;But I'm still struggling with problems of the correct MergeRecord.&lt;BR /&gt;So we both go the same way.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 12:04:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307301#M223179</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2020-12-09T12:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307645#M223278</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/37461"&gt;@stephane_davy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry I couldn't work on this further last week.&amp;nbsp;Now my solution looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;JSON from GenerateFlowFile&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;[
      {
         "myfield": "JustForHavingJson",
         "myfield1": "A"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": "B"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": "C"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": "D"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": "E"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": "X"
      },
      {
         "myfield": "JustForHavingJson",
         "myfield1": ""
      }
   ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Definitions of ControllerServices and AvroSchemaRegistry&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ControllerServices and AvroSchemaRegistry" style="width: 841px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29763i85F47AC31C24A9E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-12-14_HCC_Multiple-predicate-in-recordpath-filter_IJ_1_ControllerServices.png" alt="ControllerServices and AvroSchemaRegistry" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;ControllerServices and AvroSchemaRegistry&lt;/span&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Flow&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29764i6BC64FD1715473AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-12-14_HCC_Multiple-predicate-in-recordpath-filter_IJ_2_Flow.png" alt="Flow" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Flow&lt;/span&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Details of RecordProcessing-Processors&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Details RecordProcessing-Processors" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29765i2EF117E8DBC1322D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-12-14_HCC_Multiple-predicate-in-recordpath-filter_IJ_3_ReocrdProcessors.png" alt="Details RecordProcessing-Processors" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Details RecordProcessing-Processors&lt;/span&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Result FF-Content after MergeRecord:&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;{"myfield":"JustForHavingJson","myfield1":"A","myfield2":"C"}
{"myfield":"JustForHavingJson","myfield1":"B","myfield2":"C"}
{"myfield":"JustForHavingJson","myfield1":"C","myfield2":""}
{"myfield":"JustForHavingJson","myfield1":"E","myfield2":""}
{"myfield":"JustForHavingJson","myfield1":"X","myfield2":""}
{"myfield":"JustForHavingJson","myfield1":"","myfield2":""}
{"myfield":"JustForHavingJson","myfield1":"D","myfield2":"G"}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Personally I wouldn't do a MergeRecord at the end but go on with the three single connections of the UpdateRecord processors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think this could be a possible solution or have you found a better way to do this?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 08:18:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307645#M223278</guid>
      <dc:creator>justenji</dc:creator>
      <dc:date>2020-12-14T08:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: [Nifi] - Multiple predicate in recordpath filter</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307671#M223300</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67599"&gt;@justenji&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the detailed explanation, this is also what I have tested on my side and in my opinion this does the job being "record oriented" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 15:23:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Multiple-predicate-in-recordpath-filter/m-p/307671#M223300</guid>
      <dc:creator>stephane_davy</dc:creator>
      <dc:date>2020-12-14T15:23:24Z</dc:date>
    </item>
  </channel>
</rss>

