Specify File Pattern for Sequential files
Moderators: chulett, rschirm, roy
Specify File Pattern for Sequential files
I have three files named fileA.txt,FileB.txt,FileC.txt
I want to read all the files at a time and process them into the other table.
In The Properties Tab
Under Source :-
FILEPATTERN :- C:\DXFILES\File?.txt
READMETHOD :- filePattern .
But i am not able to read all the three files .
What would be the expresssion to read all the files .I think it's ? or anyother .
I want to read all the files at a time and process them into the other table.
In The Properties Tab
Under Source :-
FILEPATTERN :- C:\DXFILES\File?.txt
READMETHOD :- filePattern .
But i am not able to read all the three files .
What would be the expresssion to read all the files .I think it's ? or anyother .
Thanks
Jack
Jack
Re: Specify File Pattren for Sequential files
lazydev wrote:I have three files named fileA.txt,FileB.txt,FileC.txt
I want to read all the files at a time and process them into the other table.
In The Properties Tab
Under Source :-
FILEPATTREN :- C:\DXFILES\File?.txt
READMETHOD :- filePattren .
But i am not able to read all the three files .
What would be the expresssion to read all the files .I think it's ? or anyother .
Hi Lazydev,
Use * instead of the "?" then you will be able to read the files using the file pattern in sequential file stage.
FILEPATTREN :- C:\DXFILES\File*.txt
Thanks & Regards
MITHUN M G
ETL Devloper
MITHUN M G
ETL Devloper
Technically that "?" should work as it is a wild-card match for any single character which you have in your 1,2,3 differentiator. It works fine from DOS but perhaps the stage doesn't allow or 'understand' it.
As noted, you can fall back on the 'splat' or asterisk to mean 'any number of characters' from that point to the dot. So not only would it match
FileA.txt
FileB.txt
FileC.txt
It will also match FileAAA.txt which your first choice would not, hopefully that's not a problem.
As noted, you can fall back on the 'splat' or asterisk to mean 'any number of characters' from that point to the dot. So not only would it match
FileA.txt
FileB.txt
FileC.txt
It will also match FileAAA.txt which your first choice would not, hopefully that's not a problem.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
I have the same issue:
Can read multi file if specifed seperately use -File option.
File = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate2.csv
File = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate3.csv
Read Method = Specific Files
-File Pattern option does not function with (?) nor (*) as referenced in documentation.
Example:
FilePattern = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate?.csv
Read Method = File Pattern
Windows 2003 Server
version 8.1
Can read multi file if specifed seperately use -File option.
File = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate2.csv
File = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate3.csv
Read Method = Specific Files
-File Pattern option does not function with (?) nor (*) as referenced in documentation.
Example:
FilePattern = D:\IBM\InformationServer\Server\SeqFiles\NameAmountDate?.csv
Read Method = File Pattern
Windows 2003 Server
version 8.1
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
In fact as Craig specified, both "*" (asterisk) and "?" work just fine. It depends on what your requirement is.
1. "?" - used to replace a single character.
For Example:
File1 = /TestPath/File1.txt
File2 = /TestPath/File2.txt
These files can be read as follows:
File Pattern: /TestPath/File?.txt
OR
File Pattern: /TestPath/File*.txt
2. "*" - used to replace any number of characters.
For Example:
File1 = /TestPath/Yahoo_File.txt
File2 = /TestPath/Google_File.txt
The above files can be read as follows:
File Pattern: /TestPath/*File.txt
1. "?" - used to replace a single character.
For Example:
File1 = /TestPath/File1.txt
File2 = /TestPath/File2.txt
These files can be read as follows:
File Pattern: /TestPath/File?.txt
OR
File Pattern: /TestPath/File*.txt
2. "*" - used to replace any number of characters.
For Example:
File1 = /TestPath/Yahoo_File.txt
File2 = /TestPath/Google_File.txt
The above files can be read as follows:
File Pattern: /TestPath/*File.txt
DD
Success is right around the corner
Success is right around the corner
-
- Participant
- Posts: 63
- Joined: Mon Oct 20, 2008 12:01 am
- Location: Malaysia
I am a windows user and I have no issue in using the pattern when the input files was in fixed width and all the column type in the files defination have been set it to char and no nullable.
Those who have issue on it, may I know the input files setting of it?
Have you tried changed the "\" to "/" for the file path?
Those who have issue on it, may I know the input files setting of it?
Have you tried changed the "\" to "/" for the file path?