<?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: Using RPATH on nested list in SQL in QueryRecord in NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389671#M247042</link>
    <description>&lt;LI-CODE lang="markup"&gt;Option 2: You can use the RouteOnAttribute processor to filter out FlowFiles with null values using the expression language ${externalId:isNull()} and route them to the next processor.&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 27 Jun 2024 11:53:43 GMT</pubDate>
    <dc:creator>saquibsk</dc:creator>
    <dc:date>2024-06-27T11:53:43Z</dc:date>
    <item>
      <title>Using RPATH on nested list in SQL in QueryRecord in NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389579#M247006</link>
      <description>&lt;P&gt;I have a json&lt;/P&gt;&lt;PRE&gt;[
  {
    "orderId": "100",
    "orderItems": [
      {
        "orderItemSeqId": "101",
        "externalId": "56789"
      },
      {
        "orderItemSeqId": "102",
        "externalId": &lt;SPAN class="hljs-keyword"&gt;null&lt;/SPAN&gt;
      }
    ]
  },
  {
    "orderId": "200",
    "orderItems": [
      {
        "orderItemSeqId": "201",
        "externalId": "78990"
      },
      {
        "orderItemSeqId": "202",
        "externalId": "83937"
      }
    ]
  }
]&lt;/PRE&gt;&lt;P&gt;Using QueryRecord processor in NiFi, I wish to select the orders having any item with null externalId.&lt;/P&gt;&lt;P&gt;So, in the output we should have only the first map with "100" orderId as it has one item with null externalId.&lt;/P&gt;&lt;P&gt;I tried this SQL with RPATH but doesn't work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-keyword"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="hljs-operator"&gt;*&lt;/SPAN&gt; 
&lt;SPAN class="hljs-keyword"&gt;FROM&lt;/SPAN&gt; flowfile 
&lt;SPAN class="hljs-keyword"&gt;WHERE&lt;/SPAN&gt; RPATH_STRING(orderItems, &lt;SPAN class="hljs-string"&gt;'[*][isEmpty(./externalId)]'&lt;/SPAN&gt;)  &lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'true'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;isEmpty function of RecordPath returns true if the string is empty or null else false.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jun 2024 12:44:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389579#M247006</guid>
      <dc:creator>NidhiPal09</dc:creator>
      <dc:date>2024-06-25T12:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using RPATH on nested list in SQL in QueryRecord in NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389590#M247013</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111264"&gt;@NidhiPal09&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 19:23:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389590#M247013</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-06-25T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using RPATH on nested list in SQL in QueryRecord in NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389671#M247042</link>
      <description>&lt;LI-CODE lang="markup"&gt;Option 2: You can use the RouteOnAttribute processor to filter out FlowFiles with null values using the expression language ${externalId:isNull()} and route them to the next processor.&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jun 2024 11:53:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389671#M247042</guid>
      <dc:creator>saquibsk</dc:creator>
      <dc:date>2024-06-27T11:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using RPATH on nested list in SQL in QueryRecord in NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389765#M247072</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111264"&gt;@NidhiPal09&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:27:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-RPATH-on-nested-list-in-SQL-in-QueryRecord-in-NiFi/m-p/389765#M247072</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-07-01T17:27:54Z</dc:date>
    </item>
  </channel>
</rss>

