<?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: Filtering Json record with QueryRecord processor returns zero kb flowfile in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370662#M240781</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95347"&gt;@rafy&lt;/a&gt;&amp;nbsp; &amp;nbsp;I got the same issues when I tried to create a flow using RPATH.&amp;nbsp; &amp;nbsp;However, here is a solution i found to dial into the data array and match on the room = A:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT *&lt;BR /&gt;FROM FLOWFILE WHERE room = 'A'&lt;/PRE&gt;&lt;P&gt;I used QueryRecord With JSONTreeReader (see below) and JSONRecordSetWriter (default).&lt;/P&gt;&lt;P&gt;NiFI Flow Definition here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/cldr-steven-matison/NiFi-Templates/blob/main/QueryRecord_Sample.json" target="_self"&gt;@gitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshots:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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-center" image-alt="Screen Shot 2023-05-12 at 12.25.36 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37586iCEA2E626094CF1C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.25.36 PM.png" alt="Screen Shot 2023-05-12 at 12.25.36 PM.png" /&gt;&lt;/span&gt;&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-center" image-alt="Screen Shot 2023-05-12 at 12.26.27 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37588i27AD52C57315118D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.26.27 PM.png" alt="Screen Shot 2023-05-12 at 12.26.27 PM.png" /&gt;&lt;/span&gt;&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-center" image-alt="Screen Shot 2023-05-12 at 12.26.09 PM.png" style="width: 634px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37587i69E705A7209F4B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.26.09 PM.png" alt="Screen Shot 2023-05-12 at 12.26.09 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 16:33:21 GMT</pubDate>
    <dc:creator>steven-matison</dc:creator>
    <dc:date>2023-05-12T16:33:21Z</dc:date>
    <item>
      <title>Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370605#M240770</link>
      <description>&lt;DIV&gt;Hello all,&lt;/DIV&gt;&lt;DIV&gt;I am trying to use QueryRecord processor to filter a json file but i am getting 0kb flowfile on my filter relationship.&lt;/DIV&gt;&lt;DIV&gt;My input flowfile is:&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"data": [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"room": "A",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"path": "/old/can"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"room": "B",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"path": "/old/can"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"room": "C",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"path": "/old/can"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My filter query:&lt;/DIV&gt;&lt;DIV&gt;SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room[*]')='${'ip'}'&lt;/DIV&gt;&lt;DIV&gt;NOTE: ip is an attribute using to compare which class to filter, so if ip = A my output after filtering should be&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"data": [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"room": "A",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"path": "/old/can"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;Thank you all.&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 May 2023 09:46:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370605#M240770</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-12T09:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370636#M240775</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95347"&gt;@rafy&lt;/a&gt;&amp;nbsp;I would try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room')='${ip}'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Assuming ip is an attribute (${ip}) ofcourse.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 13:59:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370636#M240775</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-05-12T13:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370644#M240776</link>
      <description>&lt;P&gt;16:25:08 WATERROR01881003-cbda-1ae7-fdab-6af8640a064e QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=de224186-58a6-4d88-8d34-de5170bd74ed] due to org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageException: Invalid Expression: SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room')='${ip}' due to Unexpected token '}' at line 1, column 4. Query: ${ip}: {}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, i received the above error message.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:28:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370644#M240776</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-12T15:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370645#M240777</link>
      <description>&lt;P&gt;But after enclosing "ip" in a single quote like this '${'ip'}', i got another error message below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class="bulletin-info"&gt;&lt;DIV class="bulletin-timestamp"&gt;16:29:55 WAT&lt;/DIV&gt;&lt;DIV class="bulletin-severity bulletin-error"&gt;ERROR&lt;/DIV&gt;&lt;DIV class="bulletin-source bulletin-link"&gt;01881003-cbda-1ae7-fdab-6af8640a064e&lt;/DIV&gt;&lt;DIV class="clear"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=4ac8ca57-9b9b-481a-8371-1d9f1ede2ab0] due to java.lang.RuntimeException: RecordPath /room resulted in more than one return value. The RecordPath must be further constrained.: {}&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:34:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370645#M240777</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-12T15:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370646#M240778</link>
      <description>&lt;P&gt;Can you please show the source json in a :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;code box&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, try a manual test, without attribute, such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT *
FROM FLOWFILE
WHERE RPATH(data, '/room') = 'A'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will ensure the query is correct to the json payload.&amp;nbsp; &amp;nbsp;Once that works, start testing adding the attribute.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:40:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370646#M240778</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-05-12T15:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370647#M240779</link>
      <description>&lt;P&gt;This is the source json:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"data": [
		{
			"room": "A",
			"path": "/old/can"
		},
		{
			"room": "B",
			"path": "/old/can"
		},
		{
			"room": "C",
			"path": "/old/can"
		}
	]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 May 2023 15:52:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370647#M240779</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-12T15:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370650#M240780</link>
      <description>&lt;P&gt;manual testing using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room')='A'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I received an error message:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;16:47:59 WATERROR01881003-cbda-1ae7-fdab-6af8640a064e
QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=596ac8a5-8431-4b42-b7e5-84fe972fe09b] due to java.lang.RuntimeException: RecordPath /room resulted in more than one return value. The RecordPath must be further constrained.: {}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 May 2023 15:54:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370650#M240780</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-12T15:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370662#M240781</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95347"&gt;@rafy&lt;/a&gt;&amp;nbsp; &amp;nbsp;I got the same issues when I tried to create a flow using RPATH.&amp;nbsp; &amp;nbsp;However, here is a solution i found to dial into the data array and match on the room = A:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT *&lt;BR /&gt;FROM FLOWFILE WHERE room = 'A'&lt;/PRE&gt;&lt;P&gt;I used QueryRecord With JSONTreeReader (see below) and JSONRecordSetWriter (default).&lt;/P&gt;&lt;P&gt;NiFI Flow Definition here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/cldr-steven-matison/NiFi-Templates/blob/main/QueryRecord_Sample.json" target="_self"&gt;@gitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshots:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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-center" image-alt="Screen Shot 2023-05-12 at 12.25.36 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37586iCEA2E626094CF1C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.25.36 PM.png" alt="Screen Shot 2023-05-12 at 12.25.36 PM.png" /&gt;&lt;/span&gt;&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-center" image-alt="Screen Shot 2023-05-12 at 12.26.27 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37588i27AD52C57315118D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.26.27 PM.png" alt="Screen Shot 2023-05-12 at 12.26.27 PM.png" /&gt;&lt;/span&gt;&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-center" image-alt="Screen Shot 2023-05-12 at 12.26.09 PM.png" style="width: 634px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37587i69E705A7209F4B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-05-12 at 12.26.09 PM.png" alt="Screen Shot 2023-05-12 at 12.26.09 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 16:33:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370662#M240781</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-05-12T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370665#M240784</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95347"&gt;@rafy&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I dont think the QueryRecord is suppose to work this way but I could be wrong. The query record basically filters from the root array and not the nested array. Since your input is not an array json object on the root this is not going to work. and if the filter " RPATH_STRING(data, '/room')='A'" is suppose to work (not sure why its not) it will return the entire record from the root and not just the subset. I think the question has been asked before but there was no answer:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Select-a-subset-of-data-using-NiFi-QueryRecord/td-p/348002" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Select-a-subset-of-data-using-NiFi-QueryRecord/td-p/348002&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Now to resolve your problem, you have two options of processors :&lt;/P&gt;&lt;P&gt;Option 1:&amp;nbsp; EvaluateJsonPath-&amp;gt;QueryRecord-&amp;gt;JsonJoltTransformation where processors are configured as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EvaluateJsonPath&lt;/STRONG&gt; : to get the data array into root array&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_0-1683908023764.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37581i4853B7397456DEF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_0-1683908023764.png" alt="SAMSAL_0-1683908023764.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QueryRecord&lt;/STRONG&gt; : To Query the required record based on the ${ip} attribute:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_1-1683908143241.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37582i1F8C2E10DF4A23B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_1-1683908143241.png" alt="SAMSAL_1-1683908143241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JsonJoltTransformation&lt;/STRONG&gt;: To convert back to the required schema with data array&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_2-1683908662386.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37583i7254FF70033F35AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_2-1683908662386.png" alt="SAMSAL_2-1683908662386.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;spec:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "*":"data[#].&amp;amp;"
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2: Just one JoltTransformationJson with the following spec:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "data": {
        "*": {
          "room": {
            "${ipAttr}": {
              "@2": "data[0]"
            }
          }
        }
      }
    }
  }

]&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; I had to change the &lt;STRONG&gt;ip&lt;/STRONG&gt; attribute name to &lt;STRONG&gt;ipAttr&lt;/STRONG&gt; since ip is reserved Expression Language function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 16:42:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370665#M240784</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-05-12T16:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370677#M240789</link>
      <description>&lt;P&gt;Thank so much. It works. The only issue i have reconstructing back to this format using updaterecord processor:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"data": [
		{
			"room": "A",
			"path": "/old/can"
		}
	]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 13 May 2023 10:38:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370677#M240789</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-13T10:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Json record with QueryRecord processor returns zero kb flowfile</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370678#M240790</link>
      <description>&lt;P&gt;Thank you so much too. This also works. But i am actually a learner using Jolt.&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2023 10:41:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Filtering-Json-record-with-QueryRecord-processor-returns/m-p/370678#M240790</guid>
      <dc:creator>rafy</dc:creator>
      <dc:date>2023-05-13T10:41:03Z</dc:date>
    </item>
  </channel>
</rss>

