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

How can a transformation be made reusable?

0 Answers   Informatica,


where to store informatica rejected data? How to extract the informatica rejected data?

0 Answers  


I want my deployment group to refer an external configuration file, while i deploy in the production environment. How can i achieve it.

0 Answers  


write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 7000 q1 6000 q2 5000 q2 4000 q2 3000 q2 1000 q3 4000 q3 3000 q3 1000 q3 2000 q4 5000 q4 400 i want the output? q1 q2 q3 q4 sales

3 Answers   Cognizant, Flextronics,


How to get rid of non ascii characters in a string? Ex:- United States Microsoft Visual Studio Tools for Applications 2012 x86 主控支援 - 繁體中文語言套件 to United States Microsoft Visual Studio Tools for Applications 2012 x86.

1 Answers   CTS,






there is a product table prodid prodname price 100 cinthol 10 101 hamam 10 102 neem 20 103 cake 30 in the above table the price of some products are duplicated and some product prices are distinct we want to push the duplicated prices to one target and non-duplicated prices to other target without using expression and sequence generator transformation

4 Answers  


we have 20 records in source system, when we run for the 1st time, it should load only 10 records into the target, when you run for the second time it should load another 10 record which are not loaded. How do we do that? Can we write a SQL query in source qualifier to do it. This q' is asked in one f the interviews. Please let me know if anyone knows. Thanks

3 Answers   TCS,


How do you update the records with or without using update strategy?

0 Answers  


What is aggregate awareness?

1 Answers  


What does reusable transformation mean?

0 Answers  


What is the functionality of update strategy?

2 Answers  


S1 is having 1 lakh records and s2 is having 100 records, s2 should compare s1 if emp no is same data should be updated if not their it should insert the data.what are the transformation used?

5 Answers   TCS,


Categories