Hi,
We use NiFi 1.5.0.
Our use case is to get particular key pattern variables (key and value) in
the groovy InvokeScriptedProcessor. E.g I want all variables whose key
starts with "a.b.c". By this I can write a generic logic on certain
categories of variables for further use.
Is there a way progr
I think we need additional clarification on what you mean by “variables”. If
you are referring to actual Groovy variables, you can enumerate them using the
binding available in the context (see below). If you mean the attributes
available on a flowfile, you can access them similarly.
Find all
Those variables are available to be referenced via Expression Language in the
flowfile attributes. They are not intended for direct programmatic access via
code, so you don’t need to address them directly in your Groovy code.
If you need to populate specific values at configuration time, you ca
Thanks Andy, but with expression language I can only get values of
attributes and not both key and value. In our case , variable key also has
some useful information.
Thanks
On Mon, Aug 10, 2020 at 10:32 PM Andy LoPresto wrote:
> Those variables are available to be referenced via Expression Lan
Although this is an "unnatural" use of Groovy (and a conversation much
better suited for the dev list :), it is possible to get at a map of
defined variables (key and value). This counts on particular
implementations of the API and that there is no SecurityManager
installed in the JVM so Groovy ign
Thanks Matt.
Seems like what I am trying to achieve is an antipattern.
On Wed, Aug 12, 2020 at 12:59 AM Matt Burgess wrote:
> Although this is an "unnatural" use of Groovy (and a conversation much
> better suited for the dev list :), it is possible to get at a map of
> defined variables (key and