3 cols in the input file:-
depth name
1 A
2 B
3 C1
3 C2
3 C3
2 B1
3 c4
3 c5
1 A1
2 B3
3 C6
3 c7
My condition is that:-
IF depth=1 then its Distributor
IF depth=2 then Its FES
IF depth=3 then Its RETAILER
now output should come like this:-
o/p col:-
distributor FES RETAILER
A B C1
A B C2
A B C3
A B1 C4
A B1 C5
A1 B3 C6
A1 B3 C7
Anyone please help me in solving this issue.....?
there is huge amount of data in the input file and input is simple flat file and o/p is db2
Converting cols into rows
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
It'd be easier, and processing time similar, if done in Server.
Because...
Looks like you'll need to process the file sequentially (no partitioning) since every row is dependent on the previous row. There appears to be no data that you can do hash partitioning on, so PX won't buy you much and you'll have to explicitly tell PX to not run in parallel.
Write a row on every "3 row" with data from each previous 1 and 2 rows.
Store the needed columns from rows 1 and 2 in stage variables, then move them to the output link's columns when ready to write (when you're on the 3 row).
Because...
Looks like you'll need to process the file sequentially (no partitioning) since every row is dependent on the previous row. There appears to be no data that you can do hash partitioning on, so PX won't buy you much and you'll have to explicitly tell PX to not run in parallel.
Write a row on every "3 row" with data from each previous 1 and 2 rows.
Store the needed columns from rows 1 and 2 in stage variables, then move them to the output link's columns when ready to write (when you're on the 3 row).
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore