Experts,
Please help me to design a parallel job for the below scenario.
Source:
-------------------------------------------
H|file1.txt|20130526
D|123|456|789|012
D|345|678|901|234
.
.
T|0987
H|file2.txt|20130526
D|000|56W|789|Q12
D|000|67E|9E1|W34
.
.
T|1234
-------------------------------------------
Target file1:
H|file1.txt|20130526
D|123|456|789|012
D|345|678|901|234
.
.
T|0987
Target file2:
H|file2.txt|20130526
D|000|56W|789|Q12
D|000|67E|9E1|W34
.
.
T|1234
The source file can contain set of, any no of Header/Detail/Trailer records.
we need separate it into a individual files and load into a table.
Thanks
Dinesh
Need Help on job design.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Wed Nov 11, 2009 4:52 am
- Location: New York
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
I dont think parallel job is correct and efficient approach to split the files like this.You can better do in unix level,write a script to split the files the do the processing.
I dont think parallel job is correct and efficient approach to split the files like this.You can better do in unix level,write a script to split the files the do the processing.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read each line as a single VarChar and parse in a Transformer stage. Use a stage variable to conserve the file name from the header row.
Get version 9.1 in which the target Sequential File stage can distribute data as you specify, based on the second field value in the header row.
Otherwise, and provided there is a small and finite number of output files, create an output link for each file and use a constraint expession based on the value of the stage variable.
Get version 9.1 in which the target Sequential File stage can distribute data as you specify, based on the second field value in the header row.
Otherwise, and provided there is a small and finite number of output files, create an output link for each file and use a constraint expession based on the value of the stage variable.
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.