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
Differentiate between Join, Merge and Lookup stage?
What are the processing stages?
What are the steps needed to create a simple basic datastage job?
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
What is the use of datastage director?
What is datastage engine?
What are orabulk and bcp stages?
what is 'reconsideration error' and how can i respond to this error and how to debug this
what is the use of materialized view?
What are the differences between datastage and informatica?
What is the difference between orabulk and bcp stages?
What is the importance of the exception activity in datastage?
How do u convert the columns to rows in datastage?
Describe link sort?
Differentiate between validated and Compiled in the Datastage?