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
i WANTED TO USE THE RANGE LOOKUP SCENARIO IN DATASTAGE 7.5.2 SRVER JOB.i HAVE A DATE FIELD IN SOURCE AND I SHOULD MATCH IT WITH A FIELD IN LOOKUP FILE.BUT,THE FIELDS SHOULD MATCH EVEN THOUGH THERE IS SOME RANGE.CAN SOMEONE TELL ME HOW CAN I DO THAT. THANKS
Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...
what is use of SDR function?
What is a merge?
Explain the situation where you have applied SCD in your project?
What is ibm datastage?
What is the purpose of interprocessor stage in server jobs?
what is the difference between == and eq in UNIX shell scripting?
if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?
What is the difference between operational data stage (ods) and data warehouse?
If you want to use the same piece of code in different jobs, how will you achieve it?
for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr
How many types of hash files are there?
What are the different kinds of views available in a datastage director?
What is the difference between the local container and shared container?