You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by scott <tc...@gmail.com> on 2018/03/25 01:26:13 UTC

NiFi Variables

Hello community,

I'm looking for a way to edit or add to the new "variables" feature 
programmatically, such as through the API or other. For instance, I'd 
like to use a variable to configure the remote host for my SFTP 
collection, and then be able to change the value through an automated 
job when the remote host changes. This would be especially useful for 
processors that don't allow an input relationship.

Any suggestions or comments would be welcome.

Thanks,

Scott


Re: NiFi Variables

Posted by scott <tc...@gmail.com>.
Thank you Daniel and Charlie. Excellent tips. That's what I needed to 
get started.

Scott


On 03/25/2018 02:50 AM, Daniel Chaffelson wrote:
> Hi Scott,
> NiPyApi provides a python client for this purpose. There are calls to 
> get/set variables in the canvas module.
> https://github.com/Chaffelson/nipyapi
>
> Let me know if you have any troubles with it.
>
>
>
> On Sun, 25 Mar 2018, 02:28 Charlie Meyer, 
> <charlie.meyer@civitaslearning.com 
> <ma...@civitaslearning.com>> wrote:
>
>     Take a look at your browsers developer tools when you set
>     variables and mimic the calls in code. We do this using a swagger
>     generated client and it works well.
>
>     On Sat, Mar 24, 2018, 20:26 scott <tcots8888@gmail.com
>     <ma...@gmail.com>> wrote:
>
>         Hello community,
>
>         I'm looking for a way to edit or add to the new "variables"
>         feature programmatically, such as through the API or other.
>         For instance, I'd like to use a variable to configure the
>         remote host for my SFTP collection, and then be able to change
>         the value through an automated job when the remote host
>         changes. This would be especially useful for processors that
>         don't allow an input relationship.
>
>         Any suggestions or comments would be welcome.
>
>         Thanks,
>
>         Scott
>


Re: NiFi Variables

Posted by Daniel Chaffelson <ch...@gmail.com>.
Thank you for taking the time to try it!
Please let me know if there's other features you would find useful.

On Tue, 27 Mar 2018, 04:10 scott, <tc...@gmail.com> wrote:

> Daniel,
>
> That worked perfectly. Thank you for the help, and for creating this great
> tool.
>
> Scott
>
> On 03/25/2018 02:50 AM, Daniel Chaffelson wrote:
>
> Hi Scott,
> NiPyApi provides a python client for this purpose. There are calls to
> get/set variables in the canvas module.
> https://github.com/Chaffelson/nipyapi
>
> Let me know if you have any troubles with it.
>
>
>
> On Sun, 25 Mar 2018, 02:28 Charlie Meyer, <
> charlie.meyer@civitaslearning.com> wrote:
>
>> Take a look at your browsers developer tools when you set variables and
>> mimic the calls in code. We do this using a swagger generated client and it
>> works well.
>>
>> On Sat, Mar 24, 2018, 20:26 scott <tc...@gmail.com> wrote:
>>
>>> Hello community,
>>>
>>> I'm looking for a way to edit or add to the new "variables" feature
>>> programmatically, such as through the API or other. For instance, I'd
>>> like to use a variable to configure the remote host for my SFTP collection,
>>> and then be able to change the value through an automated job when the
>>> remote host changes. This would be especially useful for processors that
>>> don't allow an input relationship.
>>>
>>> Any suggestions or comments would be welcome.
>>>
>>> Thanks,
>>>
>>> Scott
>>>
>>
>

Re: NiFi Variables

Posted by scott <tc...@gmail.com>.
Daniel,

That worked perfectly. Thank you for the help, and for creating this 
great tool.

Scott


On 03/25/2018 02:50 AM, Daniel Chaffelson wrote:
> Hi Scott,
> NiPyApi provides a python client for this purpose. There are calls to 
> get/set variables in the canvas module.
> https://github.com/Chaffelson/nipyapi
>
> Let me know if you have any troubles with it.
>
>
>
> On Sun, 25 Mar 2018, 02:28 Charlie Meyer, 
> <charlie.meyer@civitaslearning.com 
> <ma...@civitaslearning.com>> wrote:
>
>     Take a look at your browsers developer tools when you set
>     variables and mimic the calls in code. We do this using a swagger
>     generated client and it works well.
>
>     On Sat, Mar 24, 2018, 20:26 scott <tcots8888@gmail.com
>     <ma...@gmail.com>> wrote:
>
>         Hello community,
>
>         I'm looking for a way to edit or add to the new "variables"
>         feature programmatically, such as through the API or other.
>         For instance, I'd like to use a variable to configure the
>         remote host for my SFTP collection, and then be able to change
>         the value through an automated job when the remote host
>         changes. This would be especially useful for processors that
>         don't allow an input relationship.
>
>         Any suggestions or comments would be welcome.
>
>         Thanks,
>
>         Scott
>


Re: NiFi Variables

Posted by Daniel Chaffelson <ch...@gmail.com>.
Hi Scott,
NiPyApi provides a python client for this purpose. There are calls to
get/set variables in the canvas module.
https://github.com/Chaffelson/nipyapi

Let me know if you have any troubles with it.



On Sun, 25 Mar 2018, 02:28 Charlie Meyer, <ch...@civitaslearning.com>
wrote:

> Take a look at your browsers developer tools when you set variables and
> mimic the calls in code. We do this using a swagger generated client and it
> works well.
>
> On Sat, Mar 24, 2018, 20:26 scott <tc...@gmail.com> wrote:
>
>> Hello community,
>>
>> I'm looking for a way to edit or add to the new "variables" feature
>> programmatically, such as through the API or other. For instance, I'd
>> like to use a variable to configure the remote host for my SFTP collection,
>> and then be able to change the value through an automated job when the
>> remote host changes. This would be especially useful for processors that
>> don't allow an input relationship.
>>
>> Any suggestions or comments would be welcome.
>>
>> Thanks,
>>
>> Scott
>>
>

Re: NiFi Variables

Posted by Charlie Meyer <ch...@civitaslearning.com>.
Take a look at your browsers developer tools when you set variables and
mimic the calls in code. We do this using a swagger generated client and it
works well.

On Sat, Mar 24, 2018, 20:26 scott <tc...@gmail.com> wrote:

> Hello community,
>
> I'm looking for a way to edit or add to the new "variables" feature
> programmatically, such as through the API or other. For instance, I'd
> like to use a variable to configure the remote host for my SFTP collection,
> and then be able to change the value through an automated job when the
> remote host changes. This would be especially useful for processors that
> don't allow an input relationship.
>
> Any suggestions or comments would be welcome.
>
> Thanks,
>
> Scott
>