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
What are the difference types of stages?
What are some prerequisites for datastage?
What are routines in datastage? Enlist various types of routines.
what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?
Name the third party tools that can be used in datastage?
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
What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?
how to export or import the jobs in .ISX file
How to manage date conversion in Datastage?
Explain the importance of surrogate key in data warehousing?
Explain ibm infosphere information server and highlight its main features?
what is repositery?
What all the types of jobs you developed?
What is job control?
Explain entity, attribute and relationship in datastage?