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 load all unique products in one table and the duplicate rows in to another table. The first table should contain the following output A D The second target should contain the following output B B B C C Q2. Create a job to load each product once into one table and the remaining products which are duplicated into another table. The first table should contain the following output A B C D The second table should contain the following output B B C

3 Answers   Deloitte, IBM,


Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how

0 Answers   TCS,


1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)

0 Answers   Polaris,


How do you design PX Routines ?

1 Answers  


explain how to create SCD-2 IN DATASTAGE 7.5X2 PLZ EXPLAIN WITH 4 OR 5 RECORDS TAKE IT EXAMPLE AND JOB DESINGN URGENT

3 Answers   IBM, Polaris,






What are the different types of lookups in datastage?

0 Answers  


Enlist various types of routines in datastage.

0 Answers  


i have a scenario with i/p as ID,salary with values 1,1000 2,2000 and 3,4000 i need an extra column in the o/p named amount with values 2000,4000 and NULL. how can i get it?

2 Answers   L&T,


What is the difference between datastage and datastage tx?

0 Answers  


iam new to datastage...now i want to know what are fact tables, dimension tables in bank domain...if any body knows plz tell me asap..

4 Answers   Wipro,


What is container and then types?

1 Answers  


A job is having only 2 stages I/p dataset and target table.Job is taking very long time to load 50 million records.How to improve performance of this job.

3 Answers   IBM,


Categories