<?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 Filtering for Kafka Pipeliine Purposes in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156604#M40889</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13155/morris-david.html" nodeid="13155" target="_blank"&gt;@David Morris&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The nifi expression language can be used to route your data based on file extensions as you have described.&lt;/P&gt;&lt;P&gt;When NiFi ingested data a NiFi FlowFile is created.  That FlowFile is a combination of the original content and Metadata about that content.  Upon ingest some metadata is created for every FlowFile.  One of those attributes is named "filename" and contains the original filename of the ingested file.
&lt;/P&gt;&lt;P&gt;The RouteOnAttribute can use the NiFi Expression Language to evaluate the Flowfile's "filename" attribute fro routing purposes:
&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7741-screen-shot-2016-09-16-at-34705-pm.png" style="width: 2356px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20893i9CFB35AD3ED8D456/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7741-screen-shot-2016-09-16-at-34705-pm.png" alt="7741-screen-shot-2016-09-16-at-34705-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the RouteOnAttribute processor you would need to add new properties fro each file extension type you want to look for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7742-screen-shot-2016-09-16-at-34834-pm.png" style="width: 1604px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20894iA6DBFF7AD07AD971/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7742-screen-shot-2016-09-16-at-34834-pm.png" alt="7742-screen-shot-2016-09-16-at-34834-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Each one of those newly added properties become new relationships for that processor that can then be routed to follow-on processors as seen in the example above.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 12:20:27 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-08-18T12:20:27Z</dc:date>
    <item>
      <title>NiFi Filtering for Kafka Pipeliine Purposes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156603#M40888</link>
      <description>&lt;P&gt;Hello. I'm trying to
create a fileType filtering system under Nifi. My team plans on kafka ingesting
various types of files and processing their metadata for various purposes. &lt;/P&gt;&lt;P&gt;For now, I'm simply
to fully understand how route files based on their end type (e.g. .txt, .tif) from kafka to the
appropriate custom extractors that we're developing. Given my unfamiliarity with NifFi processor coding, I'm not
positive as to how to best accomplish this task. As a Java programmer, I'd
imagine creating an abstract class, then extending it with concrete versions based on what file type we need. For example:&lt;/P&gt;&lt;P&gt;fileName.endsWith(".xml") &lt;/P&gt;&lt;P&gt;-&amp;gt; send to appropriate custome extractor, etc.&lt;/P&gt;&lt;P&gt;Based on my research thus far, I suspect that the
onRouteAttribute processor will be core to this, but I'm not 100% sure, and we lack a NiFi guru.. &lt;/P&gt;&lt;P&gt;A just need a point
in the right direction on how to start designing this pipeline filter within
NiFi. Responses are appreciated. &lt;/P&gt;&lt;P&gt;P.S. If any can point out templates that may help, it's further appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2016 00:44:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156603#M40888</guid>
      <dc:creator>morris_david</dc:creator>
      <dc:date>2016-09-17T00:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Filtering for Kafka Pipeliine Purposes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156604#M40889</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13155/morris-david.html" nodeid="13155" target="_blank"&gt;@David Morris&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The nifi expression language can be used to route your data based on file extensions as you have described.&lt;/P&gt;&lt;P&gt;When NiFi ingested data a NiFi FlowFile is created.  That FlowFile is a combination of the original content and Metadata about that content.  Upon ingest some metadata is created for every FlowFile.  One of those attributes is named "filename" and contains the original filename of the ingested file.
&lt;/P&gt;&lt;P&gt;The RouteOnAttribute can use the NiFi Expression Language to evaluate the Flowfile's "filename" attribute fro routing purposes:
&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7741-screen-shot-2016-09-16-at-34705-pm.png" style="width: 2356px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20893i9CFB35AD3ED8D456/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7741-screen-shot-2016-09-16-at-34705-pm.png" alt="7741-screen-shot-2016-09-16-at-34705-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the RouteOnAttribute processor you would need to add new properties fro each file extension type you want to look for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7742-screen-shot-2016-09-16-at-34834-pm.png" style="width: 1604px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20894iA6DBFF7AD07AD971/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7742-screen-shot-2016-09-16-at-34834-pm.png" alt="7742-screen-shot-2016-09-16-at-34834-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Each one of those newly added properties become new relationships for that processor that can then be routed to follow-on processors as seen in the example above.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 12:20:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156604#M40889</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-08-18T12:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Filtering for Kafka Pipeliine Purposes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156605#M40890</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525"&gt;@mclark&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Wow. Thanks. This may be the direction we're looking for. Thank you. This will certainly help. I feel some additional kafka questions coming along however: particularly on the topic of linking ConsumeKafka with GetKafka and it's properties, but this is definitely a big leap in where we want to be.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 03:28:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Filtering-for-Kafka-Pipeliine-Purposes/m-p/156605#M40890</guid>
      <dc:creator>morris_david</dc:creator>
      <dc:date>2016-09-20T03:28:21Z</dc:date>
    </item>
  </channel>
</rss>

