Support Questions
Find answers, ask questions, and share your expertise

Filtering records from a file using NiFi.

Hi Team,

In my file I have some records as show below,

Sample

Input-

1|transaction|I|2017-03-28|Current

1|master|B|2017-03-28|Current

1|master|A|2017-03-28|Current

Required Output-

1|transaction|I|2017-03-28|Current

1|master|A|2017-03-28|Current

While processing the file using NiFi, I want to consider only records having "I" & "A" in the third position.

I am trying to use "RouteText" processor using regular expression to filter the records. However I am not successful in getting the correct expression for filtering the records.

Could you please help me out?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Explorer

@Rohit Ravishankar

You should be able to do this with RouteText. I suspect the configurations/regex you currently have may need some updating to get the functionality your looking for. Below is a screen should of something that should work. I also created a small example here.

14316-screen-shot-2017-04-02-at-45206-pm.png

View solution in original post

2 REPLIES 2

Explorer

@Rohit Ravishankar

You should be able to do this with RouteText. I suspect the configurations/regex you currently have may need some updating to get the functionality your looking for. Below is a screen should of something that should work. I also created a small example here.

14316-screen-shot-2017-04-02-at-45206-pm.png

View solution in original post

Thanks Meyer!!!