Page 1 of 1

how to join 2 tables with different size of partitioned data

Posted: Wed Jun 30, 2004 1:38 pm
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

Posted: Wed Aug 25, 2004 1:27 pm
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