You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by James McMahon <js...@gmail.com> on 2019/11/20 18:18:10 UTC
How to use a Registry Variable in UpdateAttribute
I have an incoming filename value of LarryCurlyMoe_ABCDstooges.
I want to apply an expression in an UpdateAttribute processor that performs
a substringAfter with a Registry variable reference.
My Registry variable myTokens has value ABCD.
I'd like to apply
${filename:toUpper():substringAfter(toUpper(${myTokens}))} to give me a new
filename of STOOGES.
The expression above throws an error. How do I craft that expression to
reference the value in Registry variable myTokens?
Thanks in advance.
Re: How to use a Registry Variable in UpdateAttribute
Posted by James McMahon <js...@gmail.com>.
That was it. Such a careless oversight. Thanks very much Mark.
On Wed, Nov 20, 2019 at 1:51 PM Mark Payne <ma...@hotmail.com> wrote:
> Hi,
>
> The problem here, I think is that you're attempting to call `toUpper()` as
> a function that takes an argument. You'd need to change it instead to:
>
> ${filename:toUpper():substringAfter( ${myTokens:toUpper()} )}
>
> Thanks
> -Mark
>
>
> > On Nov 20, 2019, at 1:18 PM, James McMahon <js...@gmail.com> wrote:
> >
> > I have an incoming filename value of LarryCurlyMoe_ABCDstooges.
> > I want to apply an expression in an UpdateAttribute processor that
> performs a substringAfter with a Registry variable reference.
> > My Registry variable myTokens has value ABCD.
> > I'd like to apply
> ${filename:toUpper():substringAfter(toUpper(${myTokens}))} to give me a new
> filename of STOOGES.
> > The expression above throws an error. How do I craft that expression to
> reference the value in Registry variable myTokens?
> > Thanks in advance.
>
>
Re: How to use a Registry Variable in UpdateAttribute
Posted by Mark Payne <ma...@hotmail.com>.
Hi,
The problem here, I think is that you're attempting to call `toUpper()` as a function that takes an argument. You'd need to change it instead to:
${filename:toUpper():substringAfter( ${myTokens:toUpper()} )}
Thanks
-Mark
> On Nov 20, 2019, at 1:18 PM, James McMahon <js...@gmail.com> wrote:
>
> I have an incoming filename value of LarryCurlyMoe_ABCDstooges.
> I want to apply an expression in an UpdateAttribute processor that performs a substringAfter with a Registry variable reference.
> My Registry variable myTokens has value ABCD.
> I'd like to apply ${filename:toUpper():substringAfter(toUpper(${myTokens}))} to give me a new filename of STOOGES.
> The expression above throws an error. How do I craft that expression to reference the value in Registry variable myTokens?
> Thanks in advance.