Split the non-key
columns to separate tables with key column in both / How to split the
data of source table column-wise with respect to primary key. See the source
and target tables below.
source table: ID is the key column, Name and Phone No are non-key
columns
ID Name
Phone No
10 AAA
1111
20 BBB
2222
30 CCC
3333
40 DDD 4444
50 EEE
5555
Target Table 1
ID
|
Name
|
10
|
AAA
|
20
|
BBB
|
30
|
CCC
|
40
|
DDD
|
50
|
EEE
|
Target Table 2
ID
|
Phone No
|
10
|
1111
|
20
|
2222
|
30
|
3333
|
40
|
4444
|
50
|
5555
|
v Drag the source
table to the mapping designer.
v Connect source qualifier
to the Aggregator transformation, drag all the ports from source qualifier to
aggregator and group by the key column.
v we have
to split the columns to two different tables with the key column in each, so we
are going use two expression transformation, each will take the key column and
one non-key column. Connect aggregator transformation with each of the
expression transformation as follows.
v Connect another set
of aggregator with each expression transformation.
v Connect two
aggregators to two target tables.


