Hi All, I have a file. i need to fetch the records between
first and last records by using transform stage.

EX:-

Source:
EMPNO EMPNAME
4567 shree
6999 Ram
3265 Venkat
2655 Abhi
3665 Vamsi
5852 Amit
3256 Sagar
3265 Vishnu

Target:

EMPNO EMPNAME
6999 Ram
3265 Venkat
2655 Abhi
3665 Vamsi
5852 Amit
3256 Sagar

I dont wan't to Shree and vishnu records.we can fetch
another way also but How can I write the function in
transform stage?

Answers were Sorted based on User's Feedback



Hi All, I have a file. i need to fetch the records between first and last records by using transfo..

Answer / subhash

In the transformer stage's link constraints:
write below constraint
@INROWNUM <> 1 And @INROWNUM <> LastRow()
then you will get the desired out put.

Is This Answer Correct ?    5 Yes 1 No

Hi All, I have a file. i need to fetch the records between first and last records by using transfo..

Answer / reddymkl.dwh

If data is fetching from SeqFile, we can do this way also

Use Filter Command

Sed '1d;$d' FileName
It will delete frist and last records.

U will get answer, Plz correct me if am wrong....

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Data Stage Interview Questions

source file is having 5 records while moving into target it want to be 10 records

4 Answers   IBM,


explain unit testing,systemtesting,integrated testing

1 Answers   CSC,


What is the purpose of pivot stage?

0 Answers  


how can find maximum salary by using Remove duplicate stage?

5 Answers   IBM,


What are iconv and oconv?

0 Answers  






Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam del OUPUT NAME LOC Ram Hyd ban Raj chn pun sam del

3 Answers   HCL,


Difference between in process and inter process?

0 Answers  


There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this

5 Answers   IBM,


is it possible to access the same job by two users at a time in DataStage?

2 Answers   IBM,


Define orabulk and bcp stages?

0 Answers  


country, state 2 tables r there. in table 1 have cid,cname table2 have sid,sname,cid. i want based on cid which country's having more than 25 states i want to display?

3 Answers   Wipro,


How to create user defined environment varibale(parameter)?

1 Answers   TCS,


Categories