Help en Promote SubRecord

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
chanthou_2000
Participant
Posts: 11
Joined: Mon Jun 16, 2003 2:21 am

Help en Promote SubRecord

Post by chanthou_2000 »

Hi everyone,

I'm quite beginner in some PX Stage like "Promote Subrecord" and i have
some questions :
my record look like this :

a,b,c,d
a,e,f,g
b,h,i,j
b,k,l,m

and i want the following result :
a,b,c,d,e,f,g,h
b,h,i,j,k,l,m

1) can the "Promote Subrecord" stage do this ? i guess yes, but i want to be sure about this

2) I tried to use it but it always return me the error message
"Not an aggregate field" !!! what does it means ?

3) How to use this stage (Input/Output), it's very weird !!

Thanks

Chanthou
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No. If you promote the subrecord you won't get the subrecord column AND the contents of the subrecord - you can't have both.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chanthou_2000
Participant
Posts: 11
Joined: Mon Jun 16, 2003 2:21 am

Post by chanthou_2000 »

ray.wurlod wrote:No. If you promote the subrecord you won't get the subrecord column AND the contents of the subrecord - you can't have both. ...
Ok but do you know a stage which could do this kind of operation ?
The documentation from ascential is not very clear about that ..

thanks
balaiah
Participant
Posts: 4
Joined: Fri Jun 01, 2007 6:06 am

Post by balaiah »

one try with "pivotstage"
Thanks&Regards
Balaiah Birudugadda
91-8142333369
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

A vertical pivot will work. You will have to concatenate the values like "b e", "c f" and then use field function to map the values to the target fields. Do a search on "vertical pivot". One of those posts will give you the logic.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could split the stream into two copies, run one copy through a Promote Subrecord stage and join the two copies subsequently, selecting appropriate columns from each input to the Join 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.
Post Reply