<?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 : Monitoring in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171853#M50161</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10363/maykiwogno.html" nodeid="10363"&gt;@mayki wogno&lt;/A&gt; user defined arguments aren't really sent to ExecuteScript. If the value of the `filename` attribute is needed, it can be retrieved from the flow file itself. Below is an example of how to retrieve the `filename` attribute, update the attribute, and send the flow file to a `success` relationship.&lt;/P&gt;&lt;PRE&gt;flowFile = session.get()
if (flowFile != None):
  filename = flowFile.getAttribute("filename")
  flowFile = session.putAttribute(flowFile, "filename", filename + "new_name")
  session.transfer(flowFile, REL_SUCCESS)
&lt;/PRE&gt;&lt;P&gt;For an example that is a little more in depth, you can download a template from this &lt;A href="https://gist.github.com/mattyb149/89205fcbc6d0e15ba024"&gt;gist.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For a deeper look into developing with NiFi, please see the &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html"&gt;developer's guide.&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2016 02:43:12 GMT</pubDate>
    <dc:creator>jmeyer</dc:creator>
    <dc:date>2016-12-27T02:43:12Z</dc:date>
    <item>
      <title>NIFI : Monitoring</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171851#M50159</link>
      <description>&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;I've read this tuto : &lt;A href="https://community.hortonworks.com/articles/65027/nifi-easy-custom-logging-of-diverse-sources-in-mer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Logging&lt;/A&gt; &lt;/P&gt;&lt;P&gt;So anybody has simple example of python script to write data from ExtracText processor to ExecuteScript processor ?&lt;/P&gt;&lt;P&gt;How extract flowfile name as argument to my script python ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10809-logging-nifi.jpg" style="width: 410px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20039i18B71E1ACA514F2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10809-logging-nifi.jpg" alt="10809-logging-nifi.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:37:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171851#M50159</guid>
      <dc:creator>maykiwogno</dc:creator>
      <dc:date>2019-08-18T10:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI : Monitoring</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171852#M50160</link>
      <description>&lt;P&gt;
	&lt;A rel="user" href="https://community.cloudera.com/users/10363/maykiwogno.html" nodeid="10363"&gt;@mayki wogno&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	It should already be available in your script, if you use this:&lt;/P&gt;
&lt;PRE&gt;flowFile = session.get()
flowFile.getAttribute('filename')
&lt;/PRE&gt;&lt;P&gt;This should return your filename in your executeScript.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 02:29:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171852#M50160</guid>
      <dc:creator>dpinkston</dc:creator>
      <dc:date>2016-12-27T02:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI : Monitoring</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171853#M50161</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10363/maykiwogno.html" nodeid="10363"&gt;@mayki wogno&lt;/A&gt; user defined arguments aren't really sent to ExecuteScript. If the value of the `filename` attribute is needed, it can be retrieved from the flow file itself. Below is an example of how to retrieve the `filename` attribute, update the attribute, and send the flow file to a `success` relationship.&lt;/P&gt;&lt;PRE&gt;flowFile = session.get()
if (flowFile != None):
  filename = flowFile.getAttribute("filename")
  flowFile = session.putAttribute(flowFile, "filename", filename + "new_name")
  session.transfer(flowFile, REL_SUCCESS)
&lt;/PRE&gt;&lt;P&gt;For an example that is a little more in depth, you can download a template from this &lt;A href="https://gist.github.com/mattyb149/89205fcbc6d0e15ba024"&gt;gist.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For a deeper look into developing with NiFi, please see the &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html"&gt;developer's guide.&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 02:43:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NIFI-Monitoring/m-p/171853#M50161</guid>
      <dc:creator>jmeyer</dc:creator>
      <dc:date>2016-12-27T02:43:12Z</dc:date>
    </item>
  </channel>
</rss>

