Created 04-28-2019 12:17 AM
Hi, I am using Apache Nifi to create a flow to using GetSFTP processor. I need to select the correct file for each flow separately in a single path . Can somebody help me with the correct regex expression for the below given file names: [EUtranCellRelation]_[LD10970]_[A20190131.0445] and [EUtranCellFDD]_[LD10970]_[A20190131.0445] Both the files are in the same path but I need to select each file for separate flow using the correct filter regex expression.
Created 04-28-2019 12:17 AM
[EUtranCellRelation] *.csv or [EUtranCellFDD] *.csv logix should be somewhat like this? the rest of the values are dynamically generated
Created 04-28-2019 02:37 AM
Try with \[EUtranCellRelation\].*\.csv ,\[EUtranCellFDD\] *\.csv in GetSFTP processors.
(or)
Use RouteOnAttribute processor and filter out the files by matching filenames.
Flow:
1.GetSFTP processor 2.RouteOnAttribute //keep matching nifi expression to match files
Use NiFi expression language add two properties in RouteOnAttribute processor
${filename:startsWith('\[EUtranCellRelation\]')}
(or)
${filename:contains('\[EUtranCellRelation\]')}
Then matching files will be routed to the corresponding properties.
Created 04-29-2019 05:31 PM
Thanks a lot @Shu will try and let you know how it went