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
Answer Posted / anil
1. Input file-> Transformer -> Peek
2. Keep Tranformer in sequential mode or Make partition as same
3. Two stage variables
StgPrevSalary
StgCurrSalary
Derivations - StgVariables
StgCurrSalary- StgPrevSalary
Sal- StgCurrSalary
Output
Emp
StgCurrSalary
StgPrevSalary
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can anyone tell me a difficult situation who have handled while creating Datastage jobs?
What is the difference between an operational datastage and a data warehouse?
Differentiate between operational datastage (ods) and data warehouse?
Explain entity, attribute and relationship in datastage?
What are stage variables and constants?
Differentiate between Join, Merge and Lookup stage?
What are the different options associated with dsjob command?
Explain how a source file is populated?
Why do we use exception activity in Datastage?
What is the difference between operational data stage (ods) and data warehouse?
i have a job with 3 possibiliies finish with ststus ok abbort warning how do you handle these 3 in job sequence? explain the situation where you have appiled scd in your project? chandu
Where the datastage stored his repository?
What is the roundrobin collector?
What is a merge?
how to run a sequential file stage in parallel if the stage is used on the TARGET side