How to Read multile .csv files in Sequential stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

How to Read multile .csv files in Sequential stage

Post 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 ....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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"?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
VVVRAVINDRA999
Participant
Posts: 7
Joined: Fri Jul 08, 2011 8:32 am
Location: AUS

NEW TO DATASTAGE

Post by VVVRAVINDRA999 »

change the forward slash to backward slash and give a try
ravi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: NEW TO DATASTAGE

Post by ray.wurlod »

VVVRAVINDRA999 wrote:change the forward slash to backward slash and give a try
:?
What forward slash?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

Post by gooogle »

The job is failing with the error that the file name 201107*.csv not found in the given location

Any ideas anyone ?
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Answer the question Ray asked - do you change the method from Specific File to File Pattern when you use the wildcard character?
-craig

"You can never have too many knives" -- Logan Nine Fingers
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

Post 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 ?
vijaykumarpj
Participant
Posts: 30
Joined: Sat Dec 19, 2009 5:19 am
Location: Manchester, UK

Post 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.
Thanks,
VJ.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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...
-craig

"You can never have too many knives" -- Logan Nine Fingers
vijaykumarpj
Participant
Posts: 30
Joined: Sat Dec 19, 2009 5:19 am
Location: Manchester, UK

Post 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.
Thanks,
VJ.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Place only one file in that folder and try to read *.csv

DS User
Post Reply