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

How can we create index after completion of load process?

600


what is the difference between informatica6.1 and infomatica7.1

1719


Have you worked with/created Parameter file

1226


Difference between Data and Index Caches?

660


How can you differentiate between powercenter and power map?

623






What is rank index in rank transformation?

607


Write the different tools in the workflow manager?

575


Briefly describe lookup transformation?

601


How do you load first and last records into target table? How many ways are there to do it? Explain through mapping flows.

638


How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

697


Explain direct and indirect flat file loading (source file type) - informatica

835


What are the transformations that are not supported in mapplet?

602


Clarify the aggregator change?

595


Explain the different dimensions.

558


Explain dynamic target flat file name generation in informatica

650