transformation logic

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
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

transformation logic

Post by prasson_ibm »

my input values are in this hierarchy format:-
depth,name
1,a1
2,b1
3,c1
1,a2

and i want output in this format:-
1 2 3
a1
a1 b1
a1 b1 c1
a2

i m using this logic:-

d=stageveriable for o/p col1
if depth=1 then input.name else d

f=stageveriable for o/p col2
if depth=2 then input.name else f

r= stageveriable for o/p col3
if depth=3 then input.name else r

with this logic last row is coming like this:-
a2 b1 c1
but it should come
a2


pls help me as soon as possible
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Re: transformation logic

Post by sanjay »

Hi
once you derive

1 2 3
a1
a1 b1
a1 b1 c1
a2

again check for col 1 in stage variable if there is change in row make col 2 and col 3 has bank
Thanks


prasson_ibm wrote:my input values are in this hierarchy format:-
depth,name
1,a1
2,b1
3,c1
1,a2

and i want output in this format:-
1 2 3
a1
a1 b1
a1 b1 c1
a2

i m using this logic:-

d=stageveriable for o/p col1
if depth=1 then input.name else d

f=stageveriable for o/p col2
if depth=2 then input.name else f

r= stageveriable for o/p col3
if depth=3 then input.name else r

with this logic last row is coming like this:-
a2 b1 c1
but it should come
a2


pls help me as soon as possible
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Will the output number of fields will be always constant? As giving in this example, 3?
And please avoid ASAP marks.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply