<?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: How to fetch header &amp; trailer records from a flowfile in NiFi? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171055#M50080</link>
    <description>&lt;P&gt;Is each record ended with a newline?  Or is it just a long list of records?&lt;/P&gt;</description>
    <pubDate>Sun, 25 Dec 2016 22:17:27 GMT</pubDate>
    <dc:creator>pacificobuzz</dc:creator>
    <dc:date>2016-12-25T22:17:27Z</dc:date>
    <item>
      <title>How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171054#M50079</link>
      <description>&lt;P&gt;I have the following records in my file, &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0$20011227$20011228$1&lt;/STRONG&gt; 
1$Suresh

1$Kaamesh

1$Vijay

1$Harish

1$Sabareesh

1$Vaneesh

&lt;STRONG&gt;2$5$1$2$100 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The record which starts with '0' is the header record, '1' are the detail records &amp;amp; '2' is the footer record. I need to fetch the header &amp;amp; trailer/footer record to do some validations. &lt;/P&gt;&lt;P&gt;Could you please let me know how this can be achieved in NiFi using regex or some other way?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 16:33:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171054#M50079</guid>
      <dc:creator>rohit_ravishank</dc:creator>
      <dc:date>2016-12-25T16:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171055#M50080</link>
      <description>&lt;P&gt;Is each record ended with a newline?  Or is it just a long list of records?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 22:17:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171055#M50080</guid>
      <dc:creator>pacificobuzz</dc:creator>
      <dc:date>2016-12-25T22:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171056#M50081</link>
      <description>&lt;P&gt;The simplest way to do this would be an ExtractTest processor. You could configure it like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.cloudera.com/legacyfs/online/attachments/10795-screen-shot-2016-12-25-at-31304-pm.png" /&gt;&lt;/P&gt;&lt;P&gt;Then you will have the header and footer records in attribute fields called record_header and record_footer, respectively:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.cloudera.com/legacyfs/online/attachments/10796-screen-shot-2016-12-25-at-31656-pm.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 22:30:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171056#M50081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-25T22:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171057#M50082</link>
      <description>&lt;P&gt;Hi David, the lines are terminated by '\n' at the end.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:05:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171057#M50082</guid>
      <dc:creator>rohit_ravishank</dc:creator>
      <dc:date>2016-12-25T23:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171058#M50083</link>
      <description>&lt;P&gt;Hi Hellmar,&lt;/P&gt;&lt;P&gt;Thanks for your response, it worked!!&lt;/P&gt;&lt;P&gt;I also tried using the below regex by setting the Multi-line mode to 'True' in the ExtractText processor,&lt;/P&gt;&lt;P&gt;Header - ^[0](.*) Footer - ^[2](.*)&lt;/P&gt;&lt;P&gt;I got the same result. Do you see any issues with this approach?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:11:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171058#M50083</guid>
      <dc:creator>rohit_ravishank</dc:creator>
      <dc:date>2016-12-25T23:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171059#M50084</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15073/rohitravishankar.html" nodeid="15073"&gt;@Rohit Ravishankar&lt;/A&gt; &lt;/P&gt;&lt;P&gt;That should be fine, you could also use splitText processor before the extractText processor.  So basically each flowfile would contain a single record.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:21:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171059#M50084</guid>
      <dc:creator>dpinkston</dc:creator>
      <dc:date>2016-12-25T23:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171060#M50085</link>
      <description>&lt;P&gt;No issues - usually with regexes, there are different ways to reach the same goal.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:40:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171060#M50085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-25T23:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171061#M50086</link>
      <description>&lt;P&gt;Thanks Devin!!!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:54:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171061#M50086</guid>
      <dc:creator>rohit_ravishank</dc:creator>
      <dc:date>2016-12-25T23:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch header &amp; trailer records from a flowfile in NiFi?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171062#M50087</link>
      <description>&lt;P&gt;Thanks Hellmar!!!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 23:54:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-fetch-header-trailer-records-from-a-flowfile-in-NiFi/m-p/171062#M50087</guid>
      <dc:creator>rohit_ravishank</dc:creator>
      <dc:date>2016-12-25T23:54:20Z</dc:date>
    </item>
  </channel>
</rss>

