Stephen,

The "Command Argument" property expects the arguments to be delimited by 
semi-colons, rather than spaces. 

Try changing that property to "nameofscript.py;-j;multiline" and see if that 
works for you.

Thanks
-Mark

----------------------------------------
> Date: Thu, 4 Jun 2015 12:34:26 -0400
> Subject: Re: Executing a python script with Execute Stream Command
> From: [email protected]
> To: [email protected]
>
> Mark,
>
> The properties I am using are as follows:
>
> Command Argument: nameofscript.py -j multine
> Command Path: python
> Working Directory /opt/dev/
>
>
> Jimmy,
>
> Not exactly sure what you are asking with your question "Does the python
> script that you run from NiFi have a select set of Python packages you can
> leverage in your python script. Is it at all possible to add additional
> python packages?"
>
> Here is a sanitized version of the script. Are you asking if I can import
> more packages in my script? If so, yes, I can do that.
>
> http://pastebin.com/peSCkx6j
>
>
> Thank you guys.
>
> -Steve
>
>
> On Thu, Jun 4, 2015 at 9:57 AM, Mark Payne <[email protected]> wrote:
>
>> Stephen,
>>
>> Your understanding of the properties seem correct. Can you provide the
>> properties that you're using to configure the processor?
>>
>> Thanks
>> -mark
>>
>> ----------------------------------------
>>> Date: Thu, 4 Jun 2015 09:51:46 -0400
>>> Subject: Executing a python script with Execute Stream Command
>>> From: [email protected]
>>> To: [email protected]; [email protected]
>>>
>>> All,
>>>
>>> I am trying to configure the Execute Stream Command processor to execute
>> a
>>> python script and have the output send to a queue with PutJMS.
>>>
>>> I'm having a bit of difficulty though. I've been looking at this previous
>>> email chain which is similar to my issue.
>>> https://www.mail-archive.com/[email protected]/msg01578.html
>>>
>>> The script runs and sends the output to sys.stdout.write but when I try
>> and
>>> have NiFi run the script I see no bytes in or out which means nothing is
>>> passed to the queue.
>>>
>>> Would this be an issue with the output being sent to stdout or a property
>>> issue with ExecuteStreamCommand.
>>>
>>> I have tried several configurations of the property fields. This is my
>>> general understanding of each field and what they should be:
>>>
>>> Command Argument: name of script and arguments
>>> Command Path: python
>>> Working Directory: Directory where script is located.
>>>
>>> Any help would be greatly appreciated.
>>>
>>> --
>>> V/R
>>>
>>> Stephen M. Pietrasko
>>> Security Engineer
>>
>>
                                          

Reply via email to