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
What are the job parameters?
Can you implement SCD2 using join, transformer and funnel stage?
What are the areas of application?
how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.
What can we do with datastage director?
Differentiate between datastage and datastage tx?
What is the project in datastage?
There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this
How can one find bugs in job sequence?
How one source columns or rows to be loaded in to two different tables?
Which warehouse using in your datawarehouse
How do you reject records in a transformer?
describe the Steps to confiure a Qlogic switch
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
What are system variables and sequencers in datastage