Combining Data with no Specific Key

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
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Combining Data with no Specific Key

Post by Raftsman »

I have dataset that contains fields A,B,C and I want to add D to the dataset. D is a constant that comes from an Oracle sequel statement. Normally I would default it but it come from the database.

Thanks
Jim Stewart
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Via transformer or copy stage you can add an extra column to your dataset. Or better yet, read the value along with a constant dummy key and store it in a lookup file set. Then use the lookup stage and read this value with the dummy key.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

I added a dummy column to the transformer stage and a dummy column to the Oracle Enterprise stage, used a lookup and voila, I got my added constant column. Where there's a will there's a way.

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

Post by ray.wurlod »

I hope you exercised great creativity in naming this column! :lol:
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