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

What are the job parameters?

701


Can you implement SCD2 using join, transformer and funnel stage?

1078


What are the areas of application?

656


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.

2723


What can we do with datastage director?

666






Differentiate between datastage and datastage tx?

590


What is the project in datastage?

662


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

1801


How can one find bugs in job sequence?

780


How one source columns or rows to be loaded in to two different tables?

654


Which warehouse using in your datawarehouse

1680


How do you reject records in a transformer?

624


describe the Steps to confiure a Qlogic switch

1931


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

344


What are system variables and sequencers in datastage

604