Support Questions

Find answers, ask questions, and share your expertise

Nifi Regular expression

avatar
New Contributor
 

I am having a case in my current flow where i want to evaluate certain attributes in my flow file. This is current structure of my flowfilw:

{
Attribute1: Value
Attribute2: Value
.
Attribute k: Value
.
}

(i) So say for example, evaluate if attribute 2 is an integer of length 9. If it isn't Set the value of Attribute k to 'not valid'.

What processor or a combination of processor (maximum of 2) can i use to do this? Also can you write the underlying Expression Language for the case i just mentioned as i am new to this technology and i need to get it done soon.

1 REPLY 1

avatar
Contributor

Hello,

 

you can use the RouteOnAttribute processor using NiFi expression language on Attribute1 to route flowfiles depending on their Attribute1 value.

Then use the UpdateAttribute processor to update the value of Attribute k.

 

flow.pngrouteOnAttributeConfiguration.pngupdateattributeconfiguration.png