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
inputfile-->transformer-->outputfile
create stage variables
current salary
previous salary(intialize this to null)
derive them as below:
current salary-->previous salary
previous salary---> salary
in the output file derive previous salary as below
previoussalary--->current salary
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
options available in sequence job to run,validate?
What is the difference between validated and compiled in the datastage?
What could be a data source system?
What is a datastage job?
what is repositery?
How do you import and export data into datastage?
AGGREGATOR default datatype
What are the benefits of datastage?
What is the method of removing duplicates, without the remove duplicate stage?
1)How will u implement SCD2 by using surrogate key. 2)What are the disadvantages with surrogate key. 3)How will you handle nulls in your project for the varchar, integer data types. 4)Can I use two fact tables in star schema. 5)3 jobs are running on the 2 nodes after I added one more node so can I compile those jobs to run on three nodes.
What all are the different way to run a job?
How to read the length of word in unix?
How to convert RGB Value to Hexadecimal values in datastage?
whom do you report?
Define data aggregation?