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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / raj

hii Sbvp... can you please elaborate the above situation
clearly.... for when the source is a flat file....

thank you

Is This Answer Correct ?    0 Yes 0 No

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

Answer / raj

Hi SBVP , thanks for your answer.... if i dont know the
number of records coming from my source flat file what can i
do? please tell me

thank you

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sbvp

raj this is my mail id bhanuar.inf@gmail.com.
chat with me on evening times 7-8
i will discuss with u

thanks
sbvp

Is This Answer Correct ?    0 Yes 0 No

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

Answer / neha

IT is not possible thru Informatica, you need to write Unix
Script for this.

Is This Answer Correct ?    2 Yes 3 No

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

Answer / ravi

by using router transformation

Is This Answer Correct ?    2 Yes 4 No

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

Answer / sbvp

hi raj

when we use source as a flat file
if a flat file contians 10 records assume ok
take seq gen t/r- next val
to exp t/r
in that add a new port and give seq gen-nextval to that new
port(suppose call as seq_num ok)

take RTR t/r
create two out ports ok
seq_num<=5
seq_num>=5
contect to two tgrts ok


thanks
sbvp

Is This Answer Correct ?    0 Yes 2 No

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

Answer / sbvp

S->SQ->EXP->ROUTER->TRG
| |
| |-->TGR
SEQ<-

IN RTR SEQ<=n
SEQ>=n

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Informatica Interview Questions

When we enable pushdown optimization technique, two options will be enabled (use view,..). Can anyone tell me how these two options will work ? When do we need to go for pushdown optimization technique ?

3 Answers   IBM,


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

0 Answers   Cognizant, Flextronics,


Do you have knowledge in ralph kimball methodology

1 Answers  


whats the option in informatica 7 version is outdated in informatica 8 version onwards.

1 Answers   iGate,


In dept 10, 5 emp sal, i want to do sum of dept 10 emp sal. Is there any othere transformation than the aggrator? if yes how?

5 Answers   Patni,






How do you implement unconn. Stored proc. In a mapping?

1 Answers  


How do you handle two sessions in Informatica

0 Answers   Informatica,


have you developed documents in your project? and what documents we develop in realtime?

2 Answers   IBM,


How to do Half of the table ex: if 1000 records are there means 500 in one table and 500 in second table like this if N number of tables means how to do Half of the table ??????????

2 Answers   TCS,


What are the different types of transformation available in informatica.

0 Answers  


I have some rows in source.I have to map half rows to one target and half rows to another target.i.e you wont know how many records in source.?Implement a mapping?

1 Answers   Franklin Templeton,


Explain scd type 3 through mapping.

0 Answers  


Categories