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...


hi all, i have 1 flat file having 10 rows. like:-

id name amt
100 a 100
200 b 200
100 n 300
400 p 3000
100 a 100
600 x 6000

Now i want to load half of this data into one flat file and
remaining in other flat file.like :-

flat file 1

id name amt
100 a 100
200 b 200
100 n 300
----------------------
----------------------
flat file 2

id name amt
400 p 3000
100 a 100
600 x 6000

Plz reply me ASAP.

Answers were Sorted based on User's Feedback



hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / rashmi garg

From source to expression connect ID, Name and Amt.
Add one sequence generator and connect to expression
now expression TF is like

expression
----------
ID
Name
Amt
Number

pass number port to aggregator TF to get the max value in
number and pass ID,Name, amt and number from exression to
router and max value from aggregator to router
now router is having ports
Id
Name
Amt
Number
Max

now route the rows on the basis of
number < max/2 (output group 1)
number > max/2 (output group 2)

Is This Answer Correct ?    17 Yes 5 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / honey

when u apply the procedure given by Mr.Ramesh u will get
alternative records to be stored in the two flatfiles.
Is this what u wanted.

Is This Answer Correct ?    5 Yes 2 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / romi

Thanks to all,

But i want to store first half data in 1 table and another
half in another table. and with procedure i m getting
alternative data.

Is This Answer Correct ?    1 Yes 1 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / srinivasarao dasari

Find the count of the records using `wc -l` Command and
pass this to mapping varaiable.Now you can route the data
by dividing 2.I hope this would be helpful to you.

Is This Answer Correct ?    2 Yes 2 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / psnadh

Hi,

In the source file if the row count is odd number,then how
can we check the condition to divide the ff into two halves?

If it is even,we can divide the ff into two halves as per
the above solutions.

Please give me reply how to implent that

Thanks in Advance

Is This Answer Correct ?    1 Yes 1 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / shashank

source->SQ->exp[dummyRow=1]->sorter[sort by dummyRow]->
(input to 2 transformation,pipeline branching)
1. joiner[normal join on dummyRow]
2. aggregator[no group by,add port TotalNoOfRows with
expression COUNT(dummyRow)]
Sequence generator->joiner{say port name be RowNo}
{so, joiner will get input from 3 trn, sorter, seq gen &
agg}
Joiner->exp[add port halfNo with exp iff
(RowNo<=TotalNoOfRows/2,1,2)]-> router[halfNo=1,halfNo=2]
->Target1(if halfNo=1)
->Target2(if halfNo=2)

Is This Answer Correct ?    1 Yes 1 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / indra

NOT GOT APPROPRIATE RESULT BY GOING THROUGH THE SOLUTION
GIVEN BY Shashank....

Is This Answer Correct ?    0 Yes 0 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / bsgsr

send the flat file data into an expression transformation
and create a new pory say xyz and connect nextval mport on
seq_gen to this. then connect expression to router take two
groups. using the nem port created write conditions.
newport<5 in first group ice versa. i believe this would
work

Is This Answer Correct ?    1 Yes 3 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / bala ramesh

in this logic , frist take one sequene genrator
transformation ,pass next value to expression
transformation and also pass id,name,and amt.
in this transformation and also create one output port
(temp).it is decimat type and write codition like
(iif(NEXTVAL %2=0,0,1)) , after take one router
transformation ,pass these ports (id,name,amt and
temp) .then create two group ,one is temp=0 and another one
is temp=1.after pass first group to one flat file ,second
group to second flat file.

Is This Answer Correct ?    3 Yes 6 No

hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 ..

Answer / sajjan

solution1:- use rank transformation, divide into two
quartiles and pass them to different targets

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Informatica Interview Questions

How to retrieve last two days updated records?

4 Answers  


I am having source ENO ENAME LOC 1 A PUNE 2 B MUMBAI 3 C CHENNAI Target ENO ENAME LOC 1 A PUNE 2 B MUMBAI 3 C CHENNAI If a new record coming from source from same location it should directly go to specified location in target at begining EX:if Eno with 4 coming from same Pune, It should directly load into the Pune location col with '|' symbol. Help me its very urgent

5 Answers   Polaris, Zensar,


What exactly mentioned in High level design document.can somebody explain me sequentialy.

1 Answers   IBM,


How many types of sessions are there in informatica.please explain them?

0 Answers   Informatica,


what is the -ve test case in your project.

0 Answers   CTS, TCS,


What is native users?

0 Answers  


How you prepared reports for OLAP?

0 Answers  


What is a snowflake schema?

0 Answers  


If you have 10 mappings designed and you need to implement some chages (may be in existing mapping or new mapping need to be designed) then how much time it takes from easier to complex?

1 Answers  


List the transformation used for the following: (1) Heterogeneous Sources (2) Homogeneous Sources (3) Find the 5 highest paid employees within a dept. (4) Create a Summary table (5) Generate surrogate keys

1 Answers  


Without source how to insert record to target?

6 Answers  


what are the limitations for bulk loading in informatica for all kind of databases and transformations?

3 Answers   Accenture, CSC,


Categories