You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Brian Ghigiarelli <br...@gmail.com> on 2015/04/22 17:59:17 UTC

Expression Language Extensions/Plugins

Are there any docs or guides on how to extend the expression language
functions in order to create our own as plugins?

-- 
Brian Ghigiarelli

Re: Expression Language Extensions/Plugins

Posted by Mark Payne <ma...@hotmail.com>.
Brian,

I would encourage you to create a JIRA ticket with these ideas.

They are good ideas that we don't want to lose.

As far as allowing pluggable functions, that's likely a pretty big task 
and not likely to have too soon. But these functions could be 
implemented much sooner than that, I would imagine.

Thanks
-mark


------ Original Message ------
From: "Brian Ghigiarelli" <br...@gmail.com>
To: dev@nifi.incubator.apache.org
Sent: 4/23/2015 12:52:49 PM
Subject: Re: Expression Language Extensions/Plugins

>Also, we'd like to be able to format a timestamp (number) into a 
>particular
>timezone regardless of the timezone set on the host. Since NiFi uses
>SimpleDateFormat, that's exposed programmatically via 
>sdf.setTimeZone(...).
>
>On Thu, Apr 23, 2015 at 10:20 AM, Brian Ghigiarelli 
><br...@gmail.com>
>wrote:
>
>>  Thanks! A few options for extension language enhancements I can think 
>>of
>>  off-hand are:
>>
>>     - Capitalize
>>     - Pretty Date ( e.g., "yesterday", "an hour ago", "a few seconds 
>>ago" )
>>     - Phone Formatter
>>     - IP v4 and v6 Formatters
>>
>>  While a few of those can be done with some chaining of the existing
>>  methods, it would be much nicer to handle more cleanly.
>>
>>  Brian
>>
>>  On Wed, Apr 22, 2015 at 12:14 PM, Joe Witt <jo...@gmail.com> 
>>wrote:
>>
>>>  it being open source means it is extensible.
>>>
>>>  It as a functional area not designed for extension means it will be
>>>  less fun to do so. Definitely sounds like something worth thinking
>>>  through how it can be done.
>>>
>>>  On Wed, Apr 22, 2015 at 12:10 PM, Mark Payne <ma...@hotmail.com>
>>>  wrote:
>>>  > Brian,
>>>  >
>>>  > The Expression Language is one of the few features in NiFi that we 
>>>do
>>>  not
>>>  > make extensible. It's an interesting idea though... I'd have to 
>>>think
>>>  more
>>>  > about how that would be accomplished under the hood. It would be 
>>>tricky
>>>  but
>>>  > probably doable.
>>>  >
>>>  > What function(s) did you have in mind?
>>>  >
>>>  > Thanks
>>>  > -Mark
>>>  >
>>>  >
>>>  >
>>>  > ------ Original Message ------
>>>  > From: "Brian Ghigiarelli" <br...@gmail.com>
>>>  > To: dev@nifi.incubator.apache.org
>>>  > Sent: 4/22/2015 11:59:17 AM
>>>  > Subject: Expression Language Extensions/Plugins
>>>  >
>>>  >> Are there any docs or guides on how to extend the expression 
>>>language
>>>  >> functions in order to create our own as plugins?
>>>  >>
>>>  >> --
>>>  >> Brian Ghigiarelli
>>>
>>
>>

Re: Expression Language Extensions/Plugins

Posted by Brian Ghigiarelli <br...@gmail.com>.
Also, we'd like to be able to format a timestamp (number) into a particular
timezone regardless of the timezone set on the host.  Since NiFi uses
SimpleDateFormat, that's exposed programmatically via sdf.setTimeZone(...).

On Thu, Apr 23, 2015 at 10:20 AM, Brian Ghigiarelli <br...@gmail.com>
wrote:

> Thanks!  A few options for extension language enhancements I can think of
> off-hand are:
>
>    - Capitalize
>    - Pretty Date ( e.g., "yesterday", "an hour ago", "a few seconds ago" )
>    - Phone Formatter
>    - IP v4 and v6 Formatters
>
> While a few of those can be done with some chaining of the existing
> methods, it would be much nicer to handle more cleanly.
>
> Brian
>
> On Wed, Apr 22, 2015 at 12:14 PM, Joe Witt <jo...@gmail.com> wrote:
>
>> it being open source means it is extensible.
>>
>> It as a functional area not designed for extension means it will be
>> less fun to do so.  Definitely sounds like something worth thinking
>> through how it can be done.
>>
>> On Wed, Apr 22, 2015 at 12:10 PM, Mark Payne <ma...@hotmail.com>
>> wrote:
>> > Brian,
>> >
>> > The Expression Language is one of the few features in NiFi that we do
>> not
>> > make extensible. It's an interesting idea though... I'd have to think
>> more
>> > about how that would be accomplished under the hood. It would be tricky
>> but
>> > probably doable.
>> >
>> > What function(s) did you have in mind?
>> >
>> > Thanks
>> > -Mark
>> >
>> >
>> >
>> > ------ Original Message ------
>> > From: "Brian Ghigiarelli" <br...@gmail.com>
>> > To: dev@nifi.incubator.apache.org
>> > Sent: 4/22/2015 11:59:17 AM
>> > Subject: Expression Language Extensions/Plugins
>> >
>> >> Are there any docs or guides on how to extend the expression language
>> >> functions in order to create our own as plugins?
>> >>
>> >> --
>> >> Brian Ghigiarelli
>>
>
>

Re: Expression Language Extensions/Plugins

Posted by Brian Ghigiarelli <br...@gmail.com>.
Thanks!  A few options for extension language enhancements I can think of
off-hand are:

   - Capitalize
   - Pretty Date ( e.g., "yesterday", "an hour ago", "a few seconds ago" )
   - Phone Formatter
   - IP v4 and v6 Formatters

While a few of those can be done with some chaining of the existing
methods, it would be much nicer to handle more cleanly.

Brian

On Wed, Apr 22, 2015 at 12:14 PM, Joe Witt <jo...@gmail.com> wrote:

> it being open source means it is extensible.
>
> It as a functional area not designed for extension means it will be
> less fun to do so.  Definitely sounds like something worth thinking
> through how it can be done.
>
> On Wed, Apr 22, 2015 at 12:10 PM, Mark Payne <ma...@hotmail.com> wrote:
> > Brian,
> >
> > The Expression Language is one of the few features in NiFi that we do not
> > make extensible. It's an interesting idea though... I'd have to think
> more
> > about how that would be accomplished under the hood. It would be tricky
> but
> > probably doable.
> >
> > What function(s) did you have in mind?
> >
> > Thanks
> > -Mark
> >
> >
> >
> > ------ Original Message ------
> > From: "Brian Ghigiarelli" <br...@gmail.com>
> > To: dev@nifi.incubator.apache.org
> > Sent: 4/22/2015 11:59:17 AM
> > Subject: Expression Language Extensions/Plugins
> >
> >> Are there any docs or guides on how to extend the expression language
> >> functions in order to create our own as plugins?
> >>
> >> --
> >> Brian Ghigiarelli
>

Re: Expression Language Extensions/Plugins

Posted by Joe Witt <jo...@gmail.com>.
it being open source means it is extensible.

It as a functional area not designed for extension means it will be
less fun to do so.  Definitely sounds like something worth thinking
through how it can be done.

On Wed, Apr 22, 2015 at 12:10 PM, Mark Payne <ma...@hotmail.com> wrote:
> Brian,
>
> The Expression Language is one of the few features in NiFi that we do not
> make extensible. It's an interesting idea though... I'd have to think more
> about how that would be accomplished under the hood. It would be tricky but
> probably doable.
>
> What function(s) did you have in mind?
>
> Thanks
> -Mark
>
>
>
> ------ Original Message ------
> From: "Brian Ghigiarelli" <br...@gmail.com>
> To: dev@nifi.incubator.apache.org
> Sent: 4/22/2015 11:59:17 AM
> Subject: Expression Language Extensions/Plugins
>
>> Are there any docs or guides on how to extend the expression language
>> functions in order to create our own as plugins?
>>
>> --
>> Brian Ghigiarelli

Re: Expression Language Extensions/Plugins

Posted by Mark Payne <ma...@hotmail.com>.
Brian,

The Expression Language is one of the few features in NiFi that we do 
not make extensible. It's an interesting idea though... I'd have to 
think more about how that would be accomplished under the hood. It would 
be tricky but probably doable.

What function(s) did you have in mind?

Thanks
-Mark


------ Original Message ------
From: "Brian Ghigiarelli" <br...@gmail.com>
To: dev@nifi.incubator.apache.org
Sent: 4/22/2015 11:59:17 AM
Subject: Expression Language Extensions/Plugins

>Are there any docs or guides on how to extend the expression language
>functions in order to create our own as plugins?
>
>--
>Brian Ghigiarelli