Reputation: 75
I am very new to NiFi and trying to solve the following scenario:
I have a fixed width file in the following format:
AAAAAxbnkdf fg kjsdkgghjkg
CCCCCjljdsjglg gjg dkljgllkjds
EEEEEEkljdfgkd jksf sbgjsdljkga
AAAAAxbnkdfsfg grgh kjsdkgghjkg
CCCCCjljdsjgl jdjd jgdkljglsds
I want to scan each line of the file and check for lines starting with AAAAA
or CCCCC
. The output should be three different flow files where the first file should contain all the lines starting with AAAAA
, the second file should contain all the lines starting with CCCCC
and the third flow file should contain all the other lines.
Upvotes: 2
Views: 1592
Reputation: 11931
Try the RouteText processor. You will need to do a bit of configuration and add dynamic properties for the 'AAAAA'
and 'CCCCC'
lines:
After making these changes, the processor will have output relationships for 'AAAAA'
, 'CCCCCC'
, and 'unmatched' (for everything else).
Upvotes: 4