Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / anil

1. Input file-> Transformer -> Peek
2. Keep Tranformer in sequential mode or Make partition as same
3. Two stage variables
StgPrevSalary 
StgCurrSalary

Derivations - StgVariables
StgCurrSalary- StgPrevSalary
Sal-           StgCurrSalary

Output
Emp
StgCurrSalary
StgPrevSalary

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

disign the complex job in u r project?(they are aksing only complex job design and then data flow...)

2462


What are the types of containers and how to create them?

974


How many types of stage?

1176


Define ds designer?

1275


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

2374


What is the roundrobin collector?

1097


What is the use of hoursfromtime() function in transformer stage in datastage?

1067


Explain the importance of surrogate key in data warehousing?

1187


How to RD using transformer?

1422


How you can fix the truncated data error in datastage?

1784


CHANGE CAPTURE

1298


What is the difference between server job and parallel jobs?

1152


Difference between ‘validated ok’ and ‘compiled’ in data stage?

1273


Define APT_CONFIG in Datastage?

1073


How and where you used hash file?

1171