<?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: [APACHE NIFI] How to route just the last line or record of a textfile/json file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190759#M70881</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;@Andy Gisbo&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tried the "&lt;STRONG&gt;ExecuteProcess&lt;/STRONG&gt;" processor to tail the last line of the file "/tmp/test.txt" (tail -1 /tmp/test.txt)  and putting it to HDFS. With the following properties for the ExecuteProcess,   Schedule interval 60 Seconds.&lt;/P&gt;&lt;PRE&gt;Command: /usr/bin/tail
Command Arguments: -1;/tmp/test.txt
Argument Delimiter: ;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42484-executeprocess-to-hdfs.png" style="width: 575px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18477i417ED15873B81467/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42484-executeprocess-to-hdfs.png" alt="42484-executeprocess-to-hdfs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 07:33:27 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2019-08-18T07:33:27Z</dc:date>
    <item>
      <title>[APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190757#M70879</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I have a dataflow, where I convert a textfile with csv structure into a Json record.&lt;/P&gt;&lt;P&gt;After the file is converted Im actually splitting the output flowfile at $.*&lt;/P&gt;&lt;P&gt;And after that Im using the evaluateJsonPath processor to get any attributes to work with them.&lt;/P&gt;&lt;P&gt;So the dataflow looks like this:&lt;/P&gt;&lt;P&gt;getFile -&amp;gt; UpdateAttribute(adding avro shema name) -&amp;gt; ConvertRecord -&amp;gt; SplitJson -&amp;gt; EvaluateJsonPath -&amp;gt;....&lt;/P&gt;&lt;P&gt;So my problem is:&lt;/P&gt;&lt;P&gt; I just want exactly the last entry in this csv file or respectively the last json record to work with.&lt;/P&gt;&lt;P&gt;I searched already in google and I found as solution approaches to use the ${record.count} attribute (by convertRecord) or ${fragment.count} (by SplitJson) attribute to get the index of the last line/record.&lt;/P&gt;&lt;P&gt;But I dont know how/where to use these attributes get just the last entry of my text file/json record.&lt;/P&gt;&lt;P&gt;Maybe I need to route this with RouteOnAttribute processor but I dont know how the property have to look like.&lt;/P&gt;&lt;P&gt;I hope my Question/Problem is clear and you can handle my broken english.&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 18:33:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190757#M70879</guid>
      <dc:creator>jiayu_g3turbo</dc:creator>
      <dc:date>2017-11-07T18:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190758#M70880</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253"&gt;@Andy Gisbo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think you can explore the "TailFile"  and  "ExecuteStreamCommand" , I have not tested it , but it should work&lt;/P&gt;&lt;PRE&gt;(tail -n 1)&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 19:15:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190758#M70880</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-11-07T19:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190759#M70881</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;@Andy Gisbo&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tried the "&lt;STRONG&gt;ExecuteProcess&lt;/STRONG&gt;" processor to tail the last line of the file "/tmp/test.txt" (tail -1 /tmp/test.txt)  and putting it to HDFS. With the following properties for the ExecuteProcess,   Schedule interval 60 Seconds.&lt;/P&gt;&lt;PRE&gt;Command: /usr/bin/tail
Command Arguments: -1;/tmp/test.txt
Argument Delimiter: ;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42484-executeprocess-to-hdfs.png" style="width: 575px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18477i417ED15873B81467/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42484-executeprocess-to-hdfs.png" alt="42484-executeprocess-to-hdfs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:33:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190759#M70881</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-08-18T07:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190760#M70882</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;@Andy Gisbo&lt;/A&gt;&lt;P&gt;Before splitjson processor use an &lt;STRONG&gt;ExtractText processor&lt;/STRONG&gt; and add new property to the processor as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;last_line&lt;/STRONG&gt; as&lt;/P&gt;&lt;PRE&gt;^.*\,(\{.*)]$&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you are converting csv to json and then using &lt;STRONG&gt;split json&lt;/STRONG&gt; processor to &lt;STRONG&gt;split json array&lt;/STRONG&gt; into individual messages.&lt;/P&gt;&lt;P&gt;Lets &lt;STRONG&gt;consider&lt;/STRONG&gt; your&lt;STRONG&gt; json array&lt;/STRONG&gt; is like&lt;/P&gt;&lt;PRE&gt;[{"id":1,"name":"foo"},{"id":2,"name":"bar"},{"id":3,"name":"bar"}]&lt;/PRE&gt;&lt;P&gt;you are interested in only &lt;/P&gt;&lt;PRE&gt;{"id":3,"name":"bar"} //which is last record in the array&lt;/PRE&gt;&lt;P&gt;Use &lt;STRONG&gt;extract text&lt;/STRONG&gt; processor before split json and &lt;STRONG&gt;add new property&lt;/STRONG&gt; as &lt;STRONG&gt;last_line&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Extract Text processor Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42485-extract.png" style="width: 1893px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18475iD38657F655770BAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42485-extract.png" alt="42485-extract.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;in this processor you can see &lt;STRONG&gt;Max Capture Group Length&lt;/STRONG&gt; property which having default value as &lt;STRONG&gt;1024(i.e 1 kb)&lt;/STRONG&gt; //it only captures 1 kb length of message. if your &lt;STRONG&gt;last record (or) message&lt;/STRONG&gt; having more than &lt;STRONG&gt;1 kb size&lt;/STRONG&gt; then increase the size as you can see above i have given &lt;STRONG&gt;4000(i.e almost 4 kb)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max Buffer Size&lt;/STRONG&gt; &lt;STRONG&gt;default value&lt;/STRONG&gt; is &lt;STRONG&gt;1 MB&lt;/STRONG&gt; //Specifies the maximum amount of data to buffer (per file) in order to apply the regular expressions. you need to configure this property as per your flow file size.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output &lt;/STRONG&gt;of this &lt;STRONG&gt;processor&lt;/STRONG&gt; will add&lt;STRONG&gt; last_line attribute&lt;/STRONG&gt; to the flow file so that you can &lt;STRONG&gt;use&lt;/STRONG&gt; that attribute by using &lt;STRONG&gt;${last_line}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42486-last-line-attr.png" style="width: 669px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18476i23D99337F994BFCC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42486-last-line-attr.png" alt="42486-last-line-attr.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:33:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190760#M70882</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T07:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190761#M70883</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; thx for your help. My next question is how can I get the values from "id" and "name" (in your example) to work with them as attribute, like I did before with EvaluateJsonPath. Is it possible to transform the "last_line" attribute into a flowfile, so I could work with it in EvaluateJsonPath? Or do you have another solution?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 22:13:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190761#M70883</guid>
      <dc:creator>jiayu_g3turbo</dc:creator>
      <dc:date>2017-11-07T22:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190762#M70884</link>
      <description>&lt;P&gt;My goal is to save these values in cassandra, so i could make a cql statement like: insert into tableA (id, name) values ('${id}', '${name}')&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 22:39:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190762#M70884</guid>
      <dc:creator>jiayu_g3turbo</dc:creator>
      <dc:date>2017-11-07T22:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190763#M70885</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46253/jiayug3turbo.html" nodeid="46253" target="_blank"&gt;@Andy Gisbo&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;If you want to extract those values then you can do that in 2 ways&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Don't want to change the flowfile content method:- &lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after Extract text processor use &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;update attribute processor:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;we are going to prepare id,name attributes in this processor &lt;/P&gt;&lt;P&gt;add new properties to the update attribute processor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. using replaceall function&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;id as &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;${last_line:replaceAll('.*"id":(.*)(?:,).*','$1')} //extract value after "id": and replace whole last_line attribute value with the value $1(first capturing group)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;name&lt;/STRONG&gt; property as&lt;/P&gt;&lt;PRE&gt;${last_line:replaceAll('.*"name":"(.*\d)(?:").*','$1')} ////extract value after "name": and replace whole last_line attribute value with the value $1(first capturing group)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Update Attribute Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42492-update.png" style="width: 1749px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18470iE489725E1508C683/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42492-update.png" alt="42492-update.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;2.Using JsonPath function:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;instead of replace all function as last_line attribute having json message so we can use jsonPath function by using nifi expression language&lt;/P&gt;&lt;P&gt;id as&lt;/P&gt;&lt;PRE&gt;${last_line:jsonPath('$.id')}&lt;/PRE&gt;&lt;P&gt;name as&lt;/P&gt;&lt;PRE&gt;${last_line:jsonPath('$.name')}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42493-update.png" style="width: 1616px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18471iB3079A1C5F4653C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42493-update.png" alt="42493-update.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both these &lt;STRONG&gt;ReplaceAll and JsonPath functions will result as same it's better and easy to use JsonPath function instead of replace all.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;After this processor we will have id,name attr associated with the flowfile so that you can use them in your insert statement&lt;/P&gt;&lt;PRE&gt;insert into tableA (id, name) values ('${id}', '${name}')&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;getFile -&amp;gt; UpdateAttribute(adding avro shema name) -&amp;gt; ConvertRecord -&amp;gt; Extract Text -&amp;gt; UpdateAttribute -&amp;gt; SplitJson -&amp;gt; EvaluateJsonPath -&amp;gt;....-&amp;gt;insert statement&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Method2:- Changing contents of the flowfile:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Replace Text Processor instead of Extract Text processor //replace text processor will change the flowfile contents&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42489-replace.png" style="width: 1603px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18472i0878304FF9CB61A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42489-replace.png" alt="42489-replace.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here in this processor we are going to change the whole content of flow file(i.e whole array to last record)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt; [{"id":1,"name":"foo"},{"id":2,"name":"bar"},{"id":3,"name":"bar"}] //input flowfile content&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;output:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{"id":3,"name":"bar"} //output flowfile content&lt;/PRE&gt;&lt;P&gt;Then use Evaluate json path processor to extract contents of the flowfile&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42490-eval-json.png" style="width: 1638px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18473i42E4E8C2E296F51F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42490-eval-json.png" alt="42490-eval-json.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Your goal is to prepare insert statement so keep Destination as flowfile-attribute in this processor.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42491-output.png" style="width: 922px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18474i380EFADE56922ECA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="42491-output.png" alt="42491-output.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;getFile -&amp;gt; UpdateAttribute(adding avro shema name) -&amp;gt; ConvertRecord -&amp;gt; ReplaceText --&amp;gt; Evaluatejson -&amp;gt; insert to cassandra.&lt;/PRE&gt;&lt;P&gt;Both these methods will add &lt;STRONG&gt;id,name attributes&lt;/STRONG&gt; to the flowfile &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method1:-&lt;/STRONG&gt; we are &lt;STRONG&gt;not going to change the contents of the flowfile&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method2:- &lt;/STRONG&gt;we are &lt;STRONG&gt;going to change&lt;/STRONG&gt; the &lt;STRONG&gt;contents of the flowfile&lt;/STRONG&gt;. &lt;STRONG&gt;//replacing whole content with last record&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can decide which one is better fits for you use case.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:33:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190763#M70885</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T07:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190764#M70886</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; thank you, I used the 2nd method and it worked like charme &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Your Answers are really nice detailed and easy to follow.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 02:25:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190764#M70886</guid>
      <dc:creator>jiayu_g3turbo</dc:creator>
      <dc:date>2017-11-08T02:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190765#M70887</link>
      <description>&lt;P&gt;I tried this solution, but it didnt worked for me. But thanks anyway&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 02:26:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190765#M70887</guid>
      <dc:creator>jiayu_g3turbo</dc:creator>
      <dc:date>2017-11-08T02:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: [APACHE NIFI] How to route just the last line or record of a textfile/json file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190766#M70888</link>
      <description>&lt;P&gt;Did you solve this problem?&lt;/P&gt;&lt;P&gt;I have a very simple way.&lt;/P&gt;&lt;P&gt;You can use JSONPath expression like "&lt;STRONG&gt;$[-1].id&lt;/STRONG&gt;" in EvaluateJsonPath.&lt;/P&gt;&lt;P&gt;"-1" means last index of attribute.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 20:24:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/APACHE-NIFI-How-to-route-just-the-last-line-or-record-of-a/m-p/190766#M70888</guid>
      <dc:creator>dorian_kwon</dc:creator>
      <dc:date>2018-10-23T20:24:05Z</dc:date>
    </item>
  </channel>
</rss>

