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
disign the complex job in u r project?(they are aksing only complex job design and then data flow...)
What are the types of containers and how to create them?
How many types of stage?
Define ds designer?
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
What is the roundrobin collector?
What is the use of hoursfromtime() function in transformer stage in datastage?
Explain the importance of surrogate key in data warehousing?
How to RD using transformer?
How you can fix the truncated data error in datastage?
CHANGE CAPTURE
What is the difference between server job and parallel jobs?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
Define APT_CONFIG in Datastage?
How and where you used hash file?