You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by KhajaAsmath Mohammed <md...@gmail.com> on 2020/10/09 16:40:31 UTC

ExtractText resulting multiple attributes

Hi,

I am extracting text using the below expression in NIFI and it results in 3
attributes.

Is there a way to get only one attribute?
event_bag
*event_bag.0*
*event_bag.1*

[image: image.png]

Thanks,
Asmath

Re: ExtractText resulting multiple attributes

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

You can set the “Include Capture Group 0” property to false. That will eliminate event_bag.0.
The processor adds a new attribute for each Capture Group specified in the Regex. So you’ll need to change your regular expression to not use Capturing Groups.

For example: (?s)(?:.*)

It probably makes sense to have another property that controls whether or not any non-zero capture groups get added as attributes or not, but currently this is how it will behave.

Thanks
-Mark


On Oct 9, 2020, at 12:40 PM, KhajaAsmath Mohammed <md...@gmail.com>> wrote:

Hi,

I am extracting text using the below expression in NIFI and it results in 3 attributes.

Is there a way to get only one attribute?
event_bag
event_bag.0
event_bag.1

<image.png>

Thanks,
Asmath