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
declare stage varibales
current salary
previous salary and initialize the previous salary to null
current salary--> previous salary
previous salary->salary
in the output file derive previousalary as
previoussalary-->current salary (stage variable)
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
how many rows sorted in sort stage by default in server jobs
Explain the importance of surrogate key in data warehousing?
what is the use of materialized view?
What are the areas of application?
Which commands are used to import and export the datastage jobs?
What are the different types of lookups in datastage?
in oracle target stage when we use load option and when we use upsert option?
how to achieve this output ? Two Input columns(ID & Name) - ID | Name 1 | Jack 1 | Kara In output there should be only 1 column which will be populated as - 1,Jack 1,Kara
How to read multiple files using a single datastage job if files have the same metadata?
What is the difference between the local container and shared container?
Demonstrate experience in maintaining quality process standards?
explain about citrix scheduling tool in datastage
What is a ds designer?
Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how
Can you explain repository tables in datastage?