how to do full outer join

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

how to do full outer join

Post by mallikharjuna »

HiAll,

I have one sequential file and one hash file as sources, how to do full outer join of these with out using oracle or oci stage in server jobs.

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

Post by ray.wurlod »

A full outer join is not possible if a hashed file is involved as one of the sources. Run the hashed file into a sequential file. Then, in a separate job, use a Merge stage to form the full outer join of the two sequential files.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Re: how to do full outer join

Post by mallikharjuna »

can we use merge stage in server jobs?i never used merge stage in server jobs,that's why i am asking this question.
MALLI
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Re: how to do full outer join

Post by balajisr »

mallikharjuna wrote:can we use merge stage in server jobs?i never used merge stage in server jobs,that's why i am asking this question.
Yes. but do not confuse server merge stage with px merge stage. They are different.
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Re: how to do full outer join

Post by mallikharjuna »

i tried with merge stage in server jobs,but this stage not allowing to giving input links to merge stage.
MALLI
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Re: how to do full outer join

Post by balajisr »

mallikharjuna wrote:i tried with merge stage in server jobs,but this stage not allowing to giving input links to merge stage.
It will not accept input links. You can specify the details about the two sequential files within the merge stage. Read the documentation for furthur details.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's why you need two separate jobs. The Merge stage (server jobs) reads two sequential files directly (it does not support input links) and forms a join between them based on criteria that you specify.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: how to do full outer join

Post by sachin1 »

good question, i agree with ray, merge stage will definitely help for outer join.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: how to do full outer join

Post by sachin1 »

hi ray i have a question like what if full outer join has lot of data, say suppose in GB, will merge hamper the performance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hamper the performance? It won't be the most performant mechanism choice regardless of join and isn't how I would choose to solve that problem. Me, I'd bulk both files into work tables in my database and do the join there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jeawin
Participant
Posts: 18
Joined: Mon Oct 04, 2004 6:49 am
Location: Milton Keynes
Contact:

Post by jeawin »

For even greater flexibility you can put data into a hash file or files and then write a pre- or post-transform routine to open the file(s) and merge the data, if necessary into a completely different field (column) format! Just make sure you have sensible key fields.
_______________________________________
"If I had asked people what they wanted they would have said faster horses"
Henry Ford
Post Reply