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
how to sort two columns in single job in datastage.
What is the difference between in process and inter process?
Is it possible to query a hash file?
how do u catch bad rows from OCI stage? And what CLI stands for?
Why fact table is in normal form?
What is quality stage?
What is the difference between account and directory options ?
1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?
DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks
How to implement complex jobs in data stage?
If you want to use the same piece of code in different jobs, how will you achieve it?
What is the method of removing duplicates, without the remove duplicate stage?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
Why do we use exception activity in Datastage?
How do you run datastage job from the command line?