Can you give some sample data:
As in, is the header repeating for each Data1?
how to deal with multiple header in a same file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 62
- Joined: Tue Sep 21, 2004 10:24 am
- Location: IBM - Chicago Area
Thanks for your quick response.
There will be distinct header for each subset.....
example, in a single file, I will be getting
header1 ---------------> "1Q05", "2Q05", "3Q05", "4Q05"
underlying Data1------>
header2----------------->"1Q06", "2Q06", "3Q06", "4Q06"
underlying Data2------->
Data1 & Data2 will be different contains.... and expecting to have records like about 100k rows..
Thanks,
Gaurav
There will be distinct header for each subset.....
example, in a single file, I will be getting
header1 ---------------> "1Q05", "2Q05", "3Q05", "4Q05"
underlying Data1------>
header2----------------->"1Q06", "2Q06", "3Q06", "4Q06"
underlying Data2------->
Data1 & Data2 will be different contains.... and expecting to have records like about 100k rows..
Thanks,
Gaurav
-
- Premium Member
- Posts: 62
- Joined: Tue Sep 21, 2004 10:24 am
- Location: IBM - Chicago Area
Well, Header records counts will not be fixed...it will be changing....
here are some sample data from the file....
1Q05 2Q05 3Q05 4Q05
06TGT Client Team TELE OO Fed/Exce GMR PUI 804Top Valid Revenue 8.926070 41.575685 12.089471 10.110442
06TGT Client Team TELE OO Fed/Exce GMR GS 804Top Valid Revenue 8.926070 41.575685 12.089471 10.110442
1Q06 2Q06 3Q06 4Q06
0625TGT Op Ident OO Unassigned Fed/Exce GMR 5S CR Leads 686.801830 925.533652 940.060153 1605.605841
0625TGT Op Ident OO Unassigned Fed/Exce GMR CC CR Leads 160.566881 228.354777 106.455053 184.601798
here are some sample data from the file....
1Q05 2Q05 3Q05 4Q05
06TGT Client Team TELE OO Fed/Exce GMR PUI 804Top Valid Revenue 8.926070 41.575685 12.089471 10.110442
06TGT Client Team TELE OO Fed/Exce GMR GS 804Top Valid Revenue 8.926070 41.575685 12.089471 10.110442
1Q06 2Q06 3Q06 4Q06
0625TGT Op Ident OO Unassigned Fed/Exce GMR 5S CR Leads 686.801830 925.533652 940.060153 1605.605841
0625TGT Op Ident OO Unassigned Fed/Exce GMR CC CR Leads 160.566881 228.354777 106.455053 184.601798
Hi
I think that '06TGT' & '0625TGT' is not constant. A good approach is to read file sequentially and assign stage variable to identify the pattern of the the header record. Send data to link 1 unless you dedect a new header patter which will send output to Link 2.
This should help you.
I think that '06TGT' & '0625TGT' is not constant. A good approach is to read file sequentially and assign stage variable to identify the pattern of the the header record. Send data to link 1 unless you dedect a new header patter which will send output to Link 2.
This should help you.
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Depending on exactly what you want the results to be, you might consider using the Rejects link in the Sequential File stage to capture the header lines, and process them after converting from raw format (if, indeed, you need to process them at all). This way only detail rows will appear on the main output of the Sequential File stage.
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.