how to design mapping half of source table records into one
target and remaining half into another target

Answer Posted / akash

There are 2 ways through which we can achieve this:
Through informatica transformations: Source Qualifier /
Aggregator and Expression

1. Take count through an aggregator or source qualifier.
Add a port (say record_id) from sequence generator to give
the record number.
Mark router condition as -
where record_id < = (count / 2)
send this group to one target and default group of router
to other target.

2. Use the following query in Source Qualifier:
SELECT KEY_field,
description,
(CASE WHEN ROWNUM <= ((SELECT COUNT(*) FROM TEMP_TABLE)/2)
THEN 1
ELSE 2
END) AS FLAG
FROM table_name

In the above key_field and description are the required
fields from source table.

The result will be of the type:

KEY_FIELD DESCRIPTION FLAG
1 ABC 1
2 JJJ 1
3 XYZ 2
4 PQR 2

Use a router on the condition of port FLAG to map data to
targets.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between joiner transformation and source qualifier transformation?

726


what is mean by complex business rule ?

1800


What are the different versions of informatica?

797


HAI FRIENDS THIS KISHORE FROM KUMBAKONAM. I HAVE COMPLETED MY MCA IN SASTRA UNIVERSITY WAITING FOR MY 6 TH SEM RESULT.DURING MY PROJECT I HAVE DONE INFORMATICA COURSE AS MY AREA INTEREST COURSE IN CORE MIND TECHNOLOGIES CHENNAI.I HAVE ENQUIRY ABT ALL IT PEOPLE FOR DATAWAREHOUSING THERE IS NO OPENING FOR FRESHERS. WITH SOME EXPERIENCE ANY OTHER DOMAIN TNEN ONLY U CAN GET THAT DOMAIN(DATAWAREHOUSING) JOB.BUT I AM MORE INTEREST ON THAT TO WORK ON THAT DOMAIN(INFORMATICA).WHAT TO I DO. I AM IN HELPLESS FRIENDS/EXPORTS.WAITING FOR REPLY

1797


What are pre and post-session shell commands?

851






How can one identify whether mapping is correct or not without connecting session?

1020


Explain sessions and how many types of sessions are there?

676


COL1,COL2 ABC,1 XYZ,2 HERE IN COL2 VALUES 1,2 NOT STSANDARD(IE MEANS NOT FIXED VALUES LIKE OTHER SOME VALUES LIKE 10,20) O/P IS COL1,COL2 ABC,2 XYZ,1

1628


What is blocking transformation?

802


How identifying bottlenecks in various components of informatica and resolving them?

686


tell me the rules and responsblites in our project(my project is development)

1605


State the limitations where we cannot use joiner in the mapping pipeline?

636


How big was your fact table

1409


WHAT IS EDM?WHAT IS THE USE IN INFORMATICA? chandumba2005@gmai.com

1622


generate date / time dimension in informatica

800