i want for the 3rd max sal using for the any stage but max
sal is based on the deptno ?
any body know this ans pls send this mail siva3me@gmail.com

Answers were Sorted based on User's Feedback



i want for the 3rd max sal using for the any stage but max sal is based on the deptno ? any body ..

Answer / subhash

Src ---> Tfm ---> Tgt
in the TRANSFORMER Stage.

Do the HASH partitioning the incoming data and 'Perform
Sort' on DEPTNO ASC order and SAL DESC order.

and use 2 STAGE VARIABLES sv1=0 & sv2=0.

sv2 ===> If sv1=DEPTNO Then sv2+1 Else 1
sv1 = DEPTNO

And Put the below Link contraint:
sv2=3


Then u will get 3rd highest SAL from each DEPT.

Is This Answer Correct ?    5 Yes 0 No

i want for the 3rd max sal using for the any stage but max sal is based on the deptno ? any body ..

Answer / vinod

SIMPLE ONE IS.

USE THE TRANSFORMER STAGE.

BEFORE LOADING THE DATA IN TO TRANSFORMER STAGE THE DATA
MUST IN SORTED ORDER OF SAL AS DES AND DEPT AS ASC.

IN TRANSFORMER I AM GOING TO USE THE STAGE VARIABLES.

STR IF DEPT=STR1 THEN STR+1 ELSE 1

STR1 DEPT

THEN USE THE FILTER IN THAT PLACE CONDITION STR=3

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Data Stage Interview Questions

How to perform incremental load in datastage?

0 Answers  


what is the use of DSattchJob?DetachJob? where can we find it?

0 Answers   IBM,


hi All, i have one scenario like if source--->transformer-->2 target sequential files the 1 st target sequential file is loads the data from source and 2nd target sequntial file contain the 1st target total record count,and file name of 1 st target seq file and timestamp seperated by delimeter for example if source have 10 record the 1st target seq file hav 10 records and 2nd target seq file example 10|xyz.txt|20101110 00:00:00 could you please help me out how can i implement in datastage job.

4 Answers   IBM,


How did you reconcile source with target?

2 Answers   HP,


while we using change capture stage we have to be take two table thats are 1.before table 2. after table . what is before table and after table please give me clear notation Thank You very much in advance

2 Answers   MGL,






1.What is a delta record? How you will read it? 2.What are the different types of sorting?

0 Answers   EDS,


what is data mapping

2 Answers  


What is the difference between account and directory options ?

0 Answers  


Explain Quality stage?

0 Answers  


WHAT are unix quentios in datastage

2 Answers   TCS,


how to handle null values using transformer stage?

1 Answers  


Enlist various types of routines in datastage.

0 Answers  


Categories