ETL Transformation question

Employee name start with A pass to one target,Employee name start with S pass to 2nd target,Employee name start with J pass to 3rd target,other pass to other target.

Questions by madhulatha   answers by madhulatha

Showing Answers 1 - 12 of 12 Answers

Digvijay

  • Jul 13th, 2014
 

Use a Router transformation and create 3 groups with condition as

Group_A : UPPER(SUBSTR(First_Name,1,1))=A
Group_S : UPPER(SUBSTR(First_Name,1,1))=S
Group_J : UPPER(SUBSTR(First_Name,1,1))=J
Others

By using above all rows having first name starting from A gets loaded through Group_A, First names with letter S gets loaded through Group_S. If the First name starts with letters other than A, S and J, then it gets loaded through others.

  Was this answer useful?  Yes

Abhinav

  • Jul 14th, 2014
 

You Can use INSTR function inside expression T/R and find the respective characters and raise a subsequent flag for Each Characters.Use Router T/R to send these records to multiple targets.

  Was this answer useful?  Yes

amrie

  • Jul 30th, 2014
 

In the expression
Create a variable port
v_employee=

IIF(
substr(EMPLOYEENAME,1,1)=A,FLAG1
IIF(
SUBSTR(EMPLOYEENAME,1,1)=S,FLAG2,
IIF(
SUBSTR(EMPLOYEENAME,1,1)=J,FLAG3,FLAG4 )))


create a output port in the same expression
o_employee=v_employee

IN THE ROUTER MAKE 4 GROUPS
GROUP1
o_empoyee=FLAG1

GROUP2
o_empoyee=FLAG2

GROUP3
o_empoyee=FLAG3

GROUP4
o_empoyee=FLAG4

these 4 groups are connected to the 4 targets
note : Flag4 CONTAINS VALUES OTHER THAN A,S,J

  Was this answer useful?  Yes

Sandy

  • Aug 31st, 2014
 

To make current answers generic and mapping applies even if you get more names starting with different characters:

Use Sorter, Expression & Transaction control transformations
- Using sorter transformation, sort the data either in ascending or descending order on the Employee name field
- In the expression transformation:
use substring function to get the first character of employee name and hold it in a variable port.

compare the first character of current employee name with the previous employee name, if change is noticed then go with commit after, otherwise continue transaction.

Use the property to dynamically create the target table and assign the name of the table with the help of expression transformation.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions