How to extract 10 records out of 100 records in a flat file

Showing Answers 1 - 5 of 5 Answers

sridhar

  • Oct 31st, 2006
 

1. create external directory

2. store the file in this external directory

3. create a external table corresponding to the file

4. query the external table to access records like u would do a normal table

  Was this answer useful?  Yes

afzal

  • Nov 3rd, 2006
 

hi,

For falt file sourec

source--sq--sequence generator tran.on new fileld id--filter tran. id<=10--traget

  Was this answer useful?  Yes

Anindya1281

  • May 10th, 2010
 

There are multiple ways to do it
src-->seq gen --> trans --> tgt

Use a seq gen to get transaction id

1) Filter Trans
Use filter to filter in transaction id<=10

2) Router
Route transaction id<=10 to tgt rest to default

3) Rank
Rank on transaction id to get first 10

4) Using pre session command extraxt only first 10 rows from the source

head -10 srcfile.txt

Thanks
Anindya

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions