<?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 How to pass command line arguments in executescript processor in NIFI in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228088#M63898</link>
    <description>&lt;P&gt;Dear all,

I have written user defined functions in Python / jython and executing them using executescript processor in Nifi. Till now everything went fine.

Now in one my script I need to pass command line arguments to my scripts.

Please tell me way to pass command line arguments for jython scripts. And also I would like know is there way to access property attributes from Nifi processor in my jython script in execute processor.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 15:39:23 GMT</pubDate>
    <dc:creator>shivanandk</dc:creator>
    <dc:date>2017-06-29T15:39:23Z</dc:date>
    <item>
      <title>How to pass command line arguments in executescript processor in NIFI</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228088#M63898</link>
      <description>&lt;P&gt;Dear all,

I have written user defined functions in Python / jython and executing them using executescript processor in Nifi. Till now everything went fine.

Now in one my script I need to pass command line arguments to my scripts.

Please tell me way to pass command line arguments for jython scripts. And also I would like know is there way to access property attributes from Nifi processor in my jython script in execute processor.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 15:39:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228088#M63898</guid>
      <dc:creator>shivanandk</dc:creator>
      <dc:date>2017-06-29T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass command line arguments in executescript processor in NIFI</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228089#M63899</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18919/shivanandkobanna5.html" nodeid="18919"&gt;@shivanand khobanna&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;The ExecuteStreamCommand processor should be able to do what you need to do.&lt;/P&gt;&lt;P&gt;You can access the attributes using the expression language. For instance if you have an attribute named jython1, using ${jython1} will return the value of that attribute and you can use as a parameter when calling your script.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 19:05:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228089#M63899</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-06-29T19:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass command line arguments in executescript processor in NIFI</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228090#M63900</link>
      <description>&lt;P&gt;In addition to &lt;A rel="user" href="https://community.cloudera.com/users/286/dwynne.html" nodeid="286"&gt;@Wynner&lt;/A&gt;'s answer, if you'd like to keep using ExecuteScript, you can pass in arguments as user-defined properties (aka dynamic properties) or flow file attributes and use them in ExecuteScript. For examples on leveraging user-defined properties in ExecuteScript, check out &lt;A target="_blank" href="https://community.hortonworks.com/articles/77739/executescript-cookbook-part-3.html"&gt;Part 3&lt;/A&gt; of my ExecuteScript Cookbook article series in HCC, it has examples in Jython.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 01:54:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-command-line-arguments-in-executescript/m-p/228090#M63900</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-06-30T01:54:02Z</dc:date>
    </item>
  </channel>
</rss>

