how to join 2 tables with different size of partitioned data

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
gayu
Participant
Posts: 1
Joined: Sat May 29, 2004 11:32 am

how to join 2 tables with different size of partitioned data

Post by gayu »

hi,
how do you join two tables where the join key
column in both the tables is the same as the partitioned key but the
partitions are not the same (meaning first table is
partition from 1..10, 11..20 etc and the second table
is partitioned 1..15, 16..30 etc).
how does it work internally ?
thanks!
Gayu
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Hi,

Use two input database stage (for example if your database is DB2 then use 2 DB2 enterprise stage) for each of the tables, use a join stage whose inputs will be the previous two database stages and in join stage input section, use 'entire' partitioning method if your tables are small or use 'hash' partitioning method if your tables are huge. In both the cases, the joining key will be your dabase join key. If you do this then DataStage will repartition the input data in it's own partitioning rule. Don't forget to sort the input data on joining keys if your partition method is 'Hash'..

It will work.

Regards
Amitava
Post Reply