You are on page 1of 4

SORTER AND SEQUENCE GENERATOR TRANSFORMATION

Q. Create ETL Mapping to transform below source data to target. {Source script is attached}z

Source Definition

Emp_id first_name
1 Scott
1 Scott
2 Matt
2 Matt
3 Chris

Emp_id first_name
2 Matt
2 Matt
3 Chris

Q-1: Select * from EMP_A

Minus

Select * from EMP_B

Emp_id first_name
1 Scott

Q-2.

I have the following set of records.

Id Name

101 India

102 Greece

101 America
103 Spain

102 Germany

103 Italy

I need to generate sequence & populate in the target in the following manner

S_id Id Name

1 101 India

2 101 America

1 102 Greece

2 102 Germany

1 103 Spain

2 103 Italy

Q-3- I want to find top 5 salaries without using rank transformation.

Source - Customer_Table
customer_id name Phone Address Salary
00200001 Pastka, Thomas 9988776655 #22, SRT, Street 9, NK, 30501 10500
00200002 Morley, Clark 9988776654 #23, SRT, Street 10, RK, 30501 7000
00200003 Pret, Mickel 9988776653 #24, SRT, Street 11, NK, 30501 9000
00200004 Gabriel, Peter 9988776652 #25, SRT, Street 12, NK, 30501 17000
00200005 Cena, John 9988776651 #26, SRT, Street 13, CK, 30501 12000
00200006 Allen , Hopkins 9988776657 #29, SRT, Street 13, CK, 30501 9000
00200007 Steve , Robins 9988776688 #28, SRT, Street 13, CK, 30501 24000
00200008 Adkins, Scott 9988776650 #27, SRT, Street 14, NK, 30501 14000
OUTPUT :

Target - Customer_Table
customer_id name Phone Address Salary
00200007 Steve , Robins 9988776655 #28, SRT, Street 13, CK, 30501 24000
00200004 Gabriel, Peter 9988776652 #25, SRT, Street 12, NK, 30501 17000
00200008 Adkins, Scott 9988776650 #27, SRT, Street 14, NK, 30501 14000
00200005 Cena, John 9988776651 #26, SRT, Street 13, CK, 30501 12000
00200001 Pastka, Thomas 9988776655 #22, SRT, Street 9, NK, 30501 10500

Q-4- Design an Informatica mapping to load first half records to 1 target while other half records to a
separate target.

Source - Customer_Table
customer_id name Phone Address Salary
00200001 Pastka, Thomas 9988776655 #22, SRT, Street 9, NK, 30501 10500
00200002 Morley, Clark 9988776654 #23, SRT, Street 10, RK, 30501 7000
00200003 Pret, Mickel 9988776653 #24, SRT, Street 11, NK, 30501 9000
00200004 Gabriel, Peter 9988776652 #25, SRT, Street 12, NK, 30501 17000
00200005 Cena, John 9988776651 #26, SRT, Street 13, CK, 30501 12000
00200006 Allen , Hopkins 9988776657 #29, SRT, Street 13, CK, 30501 9000
00200007 Steve , Robins 9988776688 #28, SRT, Street 13, CK, 30501 24000
00200008 Adkins, Scott 9988776650 #27, SRT, Street 14, NK, 30501 14000

OUTPUT :

Target-1 - Customer_Table
customer_id name Phone Address Salary
00200001 Pastka, Thomas 9988776655 #22, SRT, Street 9, NK, 30501 10500
00200002 Morley, Clark 9988776654 #23, SRT, Street 10, RK, 30501 7000
00200003 Pret, Mickel 9988776653 #24, SRT, Street 11, NK, 30501 9000
00200004 Gabriel, Peter 9988776652 #25, SRT, Street 12, NK, 30501 17000

Target-2 - Customer_Table
customer_id name Phone Address Salary
00200005 Cena, John 9988776651 #26, SRT, Street 13, CK, 30501 12000
00200006 Allen , Hopkins 9988776657 #29, SRT, Street 13, CK, 30501 9000
00200007 Steve , Robins 9988776688 #28, SRT, Street 13, CK, 30501 24000
00200008 Adkins, Scott 9988776650 #27, SRT, Street 14, NK, 30501 14000
Q-5-How to send Unique (Distinct) records into One target and duplicates into another tatget?

Source :
Ename EmpNo
stev 100
Stev 100
john 101
Mathew 102
Output :

Target_1:
Ename EmpNo
Stev 100
John 101
Mathew 102

Target_2:

Ename EmpNo
Stev 100

You might also like