Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

The question was on time stamp. what is the difference between HH and HH24 when to use when.

2120


What do you mean by DTM and Load manager and what is difference between load manager and load balancer?

1210


how can we find the bottle neck in SQL Query in SOURCE QUALIFIER, and how can we tune it..?

7175


What are different types of transformations available in informatica?

1056


Enlist the various types of transformations.

1118


What is informatica?

1216


What are active and passive transformations?

1128


What is aggregate cache in aggregator transformation?

1197


Explain what are the different types of transformation available in informatica.

1244


How to delete duplicate row using informatica?

1086


Define joiner transformation?

1101


To Provide Support For Mainframes Source Data, which Files Are Used As A Source Definitions?

1152


How do you set a varible in incremental aggregation

1939


Performance tuning in UNIX for informatica mappings?

2620


what is the size of u r source(like file or table)?

2306