You are on page 1of 2

6.

I have Empno,Name ,Loc in the source table , we have two targets the 1st target is Tgt_ india
and Tgt_USA. when the employee moves from india to USA the row of that employee must be
inserted in USA tgt and must be deleted in Indian tgt and vice versa.

Solution Using target POST SQL logic


Source -- Flat File
Target -- 2 Relational Tables
Database -- Oracle 9i
 
Mapping Flow :: Source > Sorter >Router >
Target 1(post sql) || Target2

7. How to convert incorrect phone number to correct phone number ?eg., 100er$556%%3457 to
100-556-3457

Solution Using REPLACECHR and SUBSTR functions


Source -- Flat File
Target -- Relational Table
Database -- Oracle 9i
 
Mapping Flow :: Source > Source qualifier >
Expression> Target

8. Devlop a mapping

Source Definition Target Definition


COMPAN SALARY_MON YEAEM ALL_COMPAN HIGH
EMP
Y TH R P Y _SAL
JOHN WIPRO 10000 2001
JOH WIPRO,IFLEX,H
60000
JOHN IFLEX 20000 N
2003 P,SATYAM
JOHN HP 30000 LU
2004
JOHN SATYAM 60000 CK
2008 CTS,EDS 35000
LUCK Y
CTS 20000 2006
Y
LUCK
EDS 35000 2008
Y

Solution Using Expression, Aggregator logic


Source -- Flat File
Target -- Relational Table
Database -- Oracle 9i
 
Mapping Flow :: Source > Sorter >Expression >
Aggregator > Target
4. Design a mapping, to load the records according to gender wise.Like as shown in below

Solution ::

Source Definition Target Definition


Name Gender Male Female
Ramya Female Raj Ramya
Raj Male Smith Prema
Prema Female Lucky Sony
Sony Female
Smith Male
Lucky Male

First
Using AGGREGATOR logic
Solution
Source -- Flat File
Target -- 1 Relational Table
Database -- Oracle 9i
 
Mapping Flow :: Source > Aggregator >
Expression > Join > Target

5. In source i have 1000 rows and i have 3 tragets . The 1st 100 rows have to go in 1st
target and the next 200 rows in 2nd traget and the rest of the rows in the 3rd tgt?

Solution ::
First
Using Router logic
Solution
Source -- Flat File
Target -- 3 Relational Tables
Database -- Oracle 9i
 
Mapping Flow :: Source > Sorter >Router >
Target 1 Target2 Target3

You might also like