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

create a job to get the previous row salary for the current row.if there is no previous row exists for the current row,then the previous row salary should be displayed as null? empid   salary   previoussalary 10      1000     null 20      2000     1000 30      3000     2000       40      4000     3000

5 Answers   Genpact,


1.How to read multiple file from sequential stage. 2.If a file doesn't arrive or doesn't exists in sequential stage how do u handle this. 3.What do you do before taking data from source to staging area. 4. I have a remove duplicate stage and transformer stage.what will u do for optimizeing the performance of the job.

4 Answers   Syntel,


How do y read Sequential file from job control?

2 Answers   HP, IBM, Telesis,


what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees

0 Answers  


what is ds administrator used for?

0 Answers  


Define Data Stage?

0 Answers  


whom do you report?

0 Answers   NTT Data,


In my source i have 10 records but i want 11 records in target. How can i acheive this in Server jobs.

2 Answers   IBM,


What are the main features of datastage?

0 Answers  


j1,j2,j3 jobs r runing iwant to run j1,j3 after j2 how to do this using sequencer? 2)j1,j2,j3 jobs r runing iwant to run j1,j2,j3 how to do this?

1 Answers   Wipro,


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

0 Answers   JPMorgan Chase,


Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?

0 Answers   HCL,


Categories