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


i have to extract data from a flat file.the flat file has 10
records.i have to extract the 1st and 5th record every
time.how is it done.

Answers were Sorted based on User's Feedback



i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / vinay

Here are the steps that you will need to follow to catch record numbers 1,5,11,15,21,25,31,35.....so on.

Step1: Create an expression T/F and define a variable to count the number of records, say we name it as "CNT"
CNT (int) = CNT+1

Step2: In the same T/F, at the end of all the ports define a flag, say we name it as
flg_VALID_ROW (string(1))=
IIF((SUBSTR(TO_CHAR(CNT),-1)= '1' or
(SUBSTR(TO_CHAR(CNT),-1)= '5'),'Y','N')

Step3: Next define a Filter T/F, where you can catch hold of the record using flag = 'Y'
Filter Cond'n: flg_VALID_ROW = 'Y'

Is This Answer Correct ?    2 Yes 0 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / sujana

satya rank transf is used 2 get max values..plz dont
misguide people

Is This Answer Correct ?    2 Yes 1 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / rajasekhar

Better to take Sequence generator t/r. initial value 0 and
current value is 1 and increment by 4 . It is suitable for
ur query

Is This Answer Correct ?    3 Yes 2 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / abhishek upadhyay

It can be done easily by a SQ generator....The SQ generator
will assign the number as a PK to all the rows.

1
2
3
4
5.... and so on

Now when this is done you can write in the post target sql
that -

delete from target table where number <>1 or number <> 5

and then the target table will be left with only 1 and 5
records

Is This Answer Correct ?    1 Yes 0 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / bala

using sequence generator we can achieve desired result
enable SG properties as
start value=1
end value=5
enable cycle....

then in expression write a condition that
if SG values(num) are 1 and 5 then pass them into filter
iif(num=1 and num=5,true,false)

in filter ...make this column condition as true...

u will get every 1st and 5th record from your source

Is This Answer Correct ?    1 Yes 0 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / sanjay

1. Method

We can do it through
sq->Exp Trns->filter-->Target
!
SG

In filter trans by giving a condition "NUM=1
or NUM=5" we can get the result.

* But if you run the wf next time u need to change the NUM
value bcoz sq increments the value accrdng to the defined
condition whenever it runs the session.

2. Method
We can do it through Router trns

SQ—-Exp—Router--Target1 & Target2
!
SG
In Ist group NUM=1 & in 2nd group NUM=5.

where we'll define two groups, One for row 1 and other for
row 5.
* we need to chng the SG value every time
3. method

We can do it through parameters & variables

Is This Answer Correct ?    1 Yes 0 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / koti

take sequence generator to target and take expr
transformation to source qualifiew transf. and one new
port. and define that port as iif(sno=1 or 5,'true','false')
connect these to target.

Is This Answer Correct ?    0 Yes 0 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / satya

after the SQ have EXPR t/r and add sequence to have unique
no's. add rank t/r get the ranks and have two filters one
for no=1 and other is for no=5 write them to the same target

hope this will address your scenario.

For more info reach me at satya.ylv@gmail.com

Is This Answer Correct ?    4 Yes 7 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / sunny

Simple.Take arithematic calculation, record divisible by five if result is zero then pass it where u want,for first record pass it directly.It's c logic man.i gave one idea that much only.

Is This Answer Correct ?    0 Yes 3 No

i have to extract data from a flat file.the flat file has 10 records.i have to extract the 1st and ..

Answer / vivek ranjan

I Think that you run the queary


select * from tablename where unique_no = 0 and unique_no =
5.

Definitally you featch 1 and 5 record every time when you
execute queary.

Is This Answer Correct ?    1 Yes 11 No

Post New Answer

More Informatica Interview Questions

Hello, Can you please send the admin and advanced mapping design sample questions to ns_sharmin@yahoo.com?

0 Answers  


What is intricate mapping?

0 Answers  


i have a source table ID NAME SAL 101 A 1000 102 B 2000 103 C 1500 target load should be ID NAME SAL 101 A 1000 101 B 2000 101 C 1500 102 A 1000 102 B 2000 102 C 1500 103 A 1000 103 B 2000 103 C 1500

3 Answers   TCS,


How to load dimension and fact in same mapping at same time.explain me the logic used for that scenario.

1 Answers   IBM,


What is sql query override? When did u use sql query override?

1 Answers   TCS,


Describe expression transformation?

0 Answers  


Explain grouped cross tab?

1 Answers   Accenture,


Name 4 output files that informatica server creates during session running?

1 Answers  


Why the UNION TRANSFERMATION is an Active TRANSFERMATION

6 Answers   Emphasis,


What is limitations of truncate and load option

1 Answers   Cap Gemini,


what are the different types of transformation available in informatica. And what are the mostly used ones among them?

0 Answers  


Define mapplet?

0 Answers  


Categories