- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
apache Nifi getsftp regex filter??
- Labels:
-
Apache NiFi
Created ‎04-28-2019 12:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot @Shu will try and let you know how it went
