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


Please Help Members By Posting Answers For Below Questions

file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

722


explain about citrix scheduling tool in datastage

2078


Differentiate between datastage and informatica?

960


Which algorithm you used for your hashfile?

904


Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.

1837


Nls stands for what in datastage?

960


What are the types of views in datastage director?

1538


How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?

2315


how many rows sorted in sort stage by default in server jobs

3762


What is the importance of the exception activity in datastage?

857


What is quality stage?

771


How we can covert server job to a parallel job?

791


AGGREGATOR default datatype

1151


Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

898


What is oci?

1088