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 / indu
input file->transformer-> output file
in transformer declare stage variables as below:
current salaray
salary
previous salary
Initialize previous salary to null
current salary ---> previous salary
previous salary----> salary
In the output file derive the previous salary as
previousalary--->previous slary (stage variable)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Describe the main features of datastage?
What is the difference between passive stage and active stage?
in oracle target stage when we use load option and when we use upsert option?
How many types of views are there in a datastage director?
How you can fix the truncated data error in datastage?
How will you load you daily/monthly jobs datas in to Fact and Dimension table using datastage.
Why do you need stage variables?
How to find value from a column in a dataset?
What is a merge?
What is the flow of loading data into fact & dimensional tables?
Describe the architecture of datastage?
Is the value of staging variable stored temporarily or permanently?
How can one find bugs in job sequence?
What is the difference between an operational datastage and a data warehouse?
Have you have ever worked in unix environment and why it is useful in datastage?