Hi,
Do we have any stage in DS parallel job,which can read all file from one directory ( example load ). My requirement is to read all files from directory ,files are fix width length files .I have to pick all files using one job then in intermediate stage i have one refrance table ( which has field defination of all files)by using which i have to bind the data with field name and put it into different table.
I want to know do we have any satge in Ds in parallel job which can read multiple files from same directory in single job (* number of files may changed in next run).
Please help me
[/img]
how to read all files from one directory ?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 77
- Joined: Tue Apr 14, 2009 4:03 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Sequential File stage.
Method 1: File Pattern of *
Method 2: Filter command of something like type *
Method 3: Filter command to run script that outputs contents of all files in directory onto stdout.
Method 1: File Pattern of *
Method 2: Filter command of something like type *
Method 3: Filter command to run script that outputs contents of all files in directory onto stdout.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 77
- Joined: Tue Apr 14, 2009 4:03 am
Thanks,ray.wurlod wrote:Sequential File stage.
Method 1: File Pattern of *
Method 2: Filter command of something like type *
Method 3: Filter command to run script that outputs contents of all fil ...
in Sequential File stage. Method 1: File Pattern of * Method ..---- if i will go for this metod can we get file name as one column and all records in another column.
Please advice
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes you can get the stage to populate a column with the File Name (and another with the line number). How it reads (parses) the files is up to you and the metadata (table definition or schema file) that you provide.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.