Author |
Message
|
anil kumar |
Posted: Wed Nov 15, 2017 4:36 am Post subject: Regular Expression in File name patterns |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Hi All,
Im trying to pick files from a local directory using a file input
my scenario is something like this
i want to read two files with two different naming convetions using single file input node
example:
i want to read two files using single file
file names :
viewfile_15112017.xml
makefile_15112017.xml
what i have tried and learnt from info center is
we can do this using ? wild card as ????file*.xml which can read the both file from the directory
but in future if any new files comes into the directory like editfile_15112017.xml it will pick that file aslo.
i thought of exculding that editfile_15112017.xml filename pattern in fileexclusion pattern but we can only ignore single file not multiple file name patterns
can any one has any solution for this |
|
Back to top |
|
 |
abhi_thri |
Posted: Thu Nov 16, 2017 1:01 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
Hi Anil...can't you provide a file exclusion pattern (eg:- editfile*.xml) if your intention is to exclude all xml file starting with editfile |
|
Back to top |
|
 |
anil kumar |
Posted: Thu Nov 16, 2017 1:12 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Hi ABHI...
yup you are correct we can ignore on file pattern as edit*.xml but if in case in future a new file comes into the folder with same 4 characters of intialname then we can not ignore that.
over all
my point is that how can we specify two different file name patterns on a single file input node . all i want to know is there a way to do that other than wildcard character ?
please suggest |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 16, 2017 6:07 am Post subject: Re: Regular Expression in File name patterns |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anil kumar wrote: |
i want to read two files with two different naming convetions using single file input node |
Why? What's the problem with a flow that has 2 FileInput nodes? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
anil kumar |
Posted: Thu Nov 16, 2017 10:53 pm Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Hi Vitor,
we have two differnet flows polling the same SFTP server(same directory) with Two different file name patterns.
they are facing issues due to our continuous poling (now 5 seconds)
we want to integrate them into a single flow using single file input node want to read two files(two files of different name pattern). using single file input and then do our logic
is this possible to specify two different name patterns on the File input node |
|
Back to top |
|
 |
abhi_thri |
Posted: Fri Nov 17, 2017 12:38 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
From what I know it is not possible to provide multiple file name patterns for the FileInput node...your original approach of having two flows searching for different file patterns against the same directory should work fine.
'they are facing issues due to our continuous poling'...can you please elaborate on the exact issue you are seeing? |
|
Back to top |
|
 |
zpat |
Posted: Fri Nov 17, 2017 12:42 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You can have two (or more) fileinput nodes in the same flow - just join them both to the next node in the flow (under the covers this does run two threads).
You can increase the file scan interval to reduce the load on the file server. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Last edited by zpat on Fri Nov 17, 2017 1:29 am; edited 1 time in total |
|
Back to top |
|
 |
anil kumar |
Posted: Fri Nov 17, 2017 12:55 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Thanks Guys,
so it is clear we can not give two different file name patterns on the single file input node.
don't know the exact issue but they said they are seeing issues.
Thanks For all your Quick answers and support |
|
Back to top |
|
 |
|