how to pick all files from DS load directory to job .

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
kaushal.kumar@igate.com
Participant
Posts: 77
Joined: Tue Apr 14, 2009 4:03 am

how to pick all files from DS load directory to job .

Post by kaushal.kumar@igate.com »

In my project i have senario like i have to pick all file from DS directory to job.
Sppose in load directory i have 4 files which may be of different formate ,i have to pick all files to my job,Please advice me how to do this? :cry:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Normal answer would be the Folder stage, but first tell us how you propose to process multiple files with different metadata in a single job. That answer will help drive the proper solution.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kaushal.kumar@igate.com
Participant
Posts: 77
Joined: Tue Apr 14, 2009 4:03 am

Post by kaushal.kumar@igate.com »

chulett wrote:Normal answer would be the Folder stage, but first tell us how you propose to process multiple files with different metadata in a single job. That answer will help drive the proper solution. ...
.
Let me explain my requirement.
Sheduler will pick multiple files from different server (which may be of different format) and put it into DS server (say in load directory).
In datastage side i have to pick all files form load directory in my job(as single column record ) ,i will have one refrance table where i have field level defination of all files .i will have to do maping between input files and refrance table and put these records into sql server( for each file i have seprate tabl in sql server).
Please advice me how to do this,It will be good for me if you help me to design a metadata for refrance table also . :)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If the files are of different format, how do you propose to process them all (parse them) in the same job? You are correct that you can read them using a single VarChar column, but what happens after that? Is there some trigger in the data that you can use to indicate how to parse that particular record type?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaushal.kumar@igate.com
Participant
Posts: 77
Joined: Tue Apr 14, 2009 4:03 am

Post by kaushal.kumar@igate.com »

ray.wurlod wrote:If the files are of different format, how do you propose to process them all (parse them) in the same job? You are correct that you can read them using a single VarChar column, but what happens after ...
yah it will give problem because in my job i will have to do header and trailer validation,which will not possible with single varchar column.Please advice me how to proceed. :cry:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Stop trying to be tricky or clever and build separate jobs for each record type. Perhaps you could build a common header/footer validation job but I'm not sure I've even bother doing that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply