<?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: Put relationship name as attribute on flowfile in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201447#M65711</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/15974/basvandelustgraaf.html" nodeid="15974"&gt;@Bas van de Lustgraaf&lt;/A&gt;&lt;P&gt;The TailFile processor adds the following attribute to each flow file it creates, tailfile.original.path = Path of the original file the flow file comes from. You could use the value of this attribute to add any additional attributes or for routing.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 00:14:38 GMT</pubDate>
    <dc:creator>Wynner</dc:creator>
    <dc:date>2017-08-01T00:14:38Z</dc:date>
    <item>
      <title>Apache NiFi: Put relationship name as attribute on flowfile</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201446#M65710</link>
      <description>&lt;P&gt;In our case we have 5 different TailFile processors as inputs and we use 5 UpdateAttribute processors to tag the flowfile comming off the TailFile processors. But this results in a crazy looking data flow with an UpdateAttribute processor for each TailFile processor.&lt;/P&gt;&lt;P&gt;So my idea was, to link each TailFile processors to one and the same UpdateAttribute processor, with each a different relationship name. Within the UpdateAttribute I wanted to grep the relationship name and put this as an attrbute on the flow file.&lt;/P&gt;&lt;P&gt;But the question is, how to get the relationship name? If this is not possible is there a more simple and manageble way to tag flow files based on the input processor (TailFile)?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/8045i4C2A91C852DFDD48/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="current.png" title="current.png" /&gt;</description>
      <pubDate>Fri, 28 Jul 2017 18:44:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201446#M65710</guid>
      <dc:creator>bas_vdl</dc:creator>
      <dc:date>2017-07-28T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Apache NiFi: Put relationship name as attribute on flowfile</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201447#M65711</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/15974/basvandelustgraaf.html" nodeid="15974"&gt;@Bas van de Lustgraaf&lt;/A&gt;&lt;P&gt;The TailFile processor adds the following attribute to each flow file it creates, tailfile.original.path = Path of the original file the flow file comes from. You could use the value of this attribute to add any additional attributes or for routing.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 00:14:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201447#M65711</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-08-01T00:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Apache NiFi: Put relationship name as attribute on flowfile</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201448#M65712</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/286/dwynne.html" nodeid="286"&gt;@Wynner&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;This will work, thank you! I've linked all TailFile inputs to a single UpdateAttribute. Using the Advanced option I've created per TailFile a rule.&lt;/P&gt;&lt;P&gt;For TailFileSuricata:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Conditions&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;${tailfile.original.path:find('/var/log/suricata/.*')}
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Action&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Attribute: log.source&lt;/LI&gt;&lt;LI&gt;Value: suricata&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 01 Aug 2017 19:00:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-NiFi-Put-relationship-name-as-attribute-on-flowfile/m-p/201448#M65712</guid>
      <dc:creator>bas_vdl</dc:creator>
      <dc:date>2017-08-01T19:00:41Z</dc:date>
    </item>
  </channel>
</rss>

