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
Hi all , I am planning for informatica S - PowerCenter 8 Mapping Design certification. I have rewuired the dumps for the same. if anyone of you having the same pl. share it with me. This will be of great help. My contact is : sagardev7@gmail.com TIA , Sagar
If I have 10 flat files with same name abc.txt files with different timestamps as source I need to load them in tgt table oracle. in between job execution fails and rows are not loaded into tgt. how can I make them load in that target even if my job fails?
how we can load rejected record's at run time?(not through bad files)
Why do you use Mapping Parameter and mapping variable?
Can we create a Integration service without a Repository service and vice versa?
What is sorter transformation?
What are the different ways to implement parallel processing in informatica?
What are the components of Informatica? And what is the purpose of each?
How to create Target definition for flat files?
Slowly changing dimensions, types and where will you use them
What is rank transformation in informatica
What all are steps in up gradation of Informatica server?
Performance tuning in UNIX for informatica mappings?
Explain your project of banking domian.
How do you manage the Parameter files while migrating your data from one environment to another environment?