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

Explain lookup transformation source types in informatica

699


What are the tasks that can be performed using sq?

614


Quickly characterize reusable change?

689


Explain why we use partitioning the session in informatica?

612


Explain transaction control transformation in informatica

763






How to load the data from a flat file into the target where the source flat file name changes daily?

575


Explain the mapping variable usage example in informatica

635


can anyone explain me about retail domain project in informatica?

7433


How to generate sequence numbers without using the sequence generator transformation?

647


Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.

1868


Where is metadata stored?

623


what is the size ur source like(file system or database)? how many record daily come u r banking project?

1745


Implementation methodology

1260


What are roles and groups and benefits of using them?

569


Suppose we do not group by on any ports of the aggregator what will be the output?

576