Page 1 of 1

How to Read multile .csv files in Sequential stage

Posted: Thu Jul 21, 2011 4:42 pm
by gooogle
I have files in a folder in this format:
20110701.csv
20110702.csv
.....
20110715.csv

In the sequential file stage I have
\\srcfolder\201107*.csv

But it wont work.

It works if I give a specfic file name:
\\srcfolder\20110701.csv

Any help appreciated ....

Posted: Thu Jul 21, 2011 6:26 pm
by ray.wurlod
Do you change the method from Specific File to File Pattern when you use the wildcard character? What do you mean by "doesn't work"?

NEW TO DATASTAGE

Posted: Thu Jul 21, 2011 7:34 pm
by VVVRAVINDRA999
change the forward slash to backward slash and give a try

Re: NEW TO DATASTAGE

Posted: Thu Jul 21, 2011 8:10 pm
by ray.wurlod
VVVRAVINDRA999 wrote:change the forward slash to backward slash and give a try
:?
What forward slash?

Posted: Thu Jul 21, 2011 9:46 pm
by gooogle
The job is failing with the error that the file name 201107*.csv not found in the given location

Any ideas anyone ?

Posted: Thu Jul 21, 2011 9:50 pm
by SURA
Datastage cant find this file name at all.

Let us know the detail info like, what you have mentioned in the stage level.

Then it will be easy to guide.

DS User

Posted: Thu Jul 21, 2011 10:29 pm
by chulett
Answer the question Ray asked - do you change the method from Specific File to File Pattern when you use the wildcard character?

Posted: Fri Jul 22, 2011 8:23 am
by gooogle
Inside the Sequential file stage I have
Source - \\ladiappd01\etl_src_files\EDW\Work_Folder\201107*.csv
Read Method - File pattern

In the source folder I have
20110701.csv
20110702.csv
....
20110719.csv

Can DataStage get all the files and run it or I need to manuall add the next date (\Work_Folder\20110701.csv)
& run it 19 times ?

Posted: Fri Jul 22, 2011 2:02 pm
by vijaykumarpj
Try using Source - \\ladiappd01\etl_src_files\EDW\Work_Folder\201107* and make sure that the property is set to comma as a delimiter.

Posted: Fri Jul 22, 2011 2:20 pm
by chulett
While 201107* may work in UNIX, it won't match files in Windows without specifying an extension as well - meaning 201107*.* would be what you should try. I don't think it will help but can't hurt to try.

Now, I'm curious - why the UNC path? Are you looking for files on a remote server? I wonder if that is part of the issue...

Posted: Sat Jul 23, 2011 7:59 pm
by vijaykumarpj
I guess, Datastage will try to read the files from the Unix server itself. Hence, 201107* should work. Pls try and let me know if the issue persists.

Posted: Mon Jul 25, 2011 12:29 am
by SURA
Place only one file in that folder and try to read *.csv

DS User