Split FlowContent by line and extract text into NIFI attributes

I am using NIFI and I want to extract the attributes of my strings.

My filetext looks like this:

DEV=A9E ,SEN=1 DEV=B9E ,SEN=2 ... 

And I want to split the text line by line and then extract the dev and sen for the attribute, in any way using NIFI, I tried to split the text and split the content, but I don’t see how I can split the text line by line.

+5
source share
1 answer

SplitText with the number of lines in 1 is usually an approach to breaking a text file into lines. It will use \ r, \ n or \ r \ n as the end of the line.

ExtractText will be used to analyze each line and extract parts of the line into the attributes of the stream file. You need to come up with a regular expression that uses capture groups to capture the parts you are interested in.

+6
source

Source: https://habr.com/ru/post/1262924/


All Articles