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
What are the functionalities of link partitioner?
What is the Environment Variable need to Set to TRIM in Project Level?(In transfermer, we TRIM function but I need to impliment this project level using Environment variable)
1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do
what is ds administrator used for?
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
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.
Define Job control?
What is the difference between the local container and shared container?
Differentiate between hash file and sequential file?
Describe link sort?
What is a merge in datastage?
Explain Quality stage?
im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination
How and where you used hash file?
Terminate Activity