in datastage interview qustion
source target
------- -------
12345 1
2
3
4
5
Answer Posted / subbuchamala
SRC-->TFM--->TGT
in TFM, Use Stage variables and Loop variables as below:
StageVar-->Len(Lnk.Source)===>this will give length of string of "Source" column. i.e.,
Source StageVar
12345 5
Next, in the Loop variable part:
Loop While==> @ITERATION<= StageVar
For input row, Loop will repeat until "Source" length(5) finishes.
Add new Loop variable-->LoopVar and put below derivation:
Left(Lnk.Source, @ITERATION)-->LoopVar
Next, in the Output Col Derivation:
LoopVar-->Target
Ex:
For 1st ITERATION: Left("12345", 1)==>1
For 2nd ITERATION: Left("12345", 2)==>2
....
....
Finally, you will required Output.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the process of killing a job in datastage?
In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?
How many types of views are there in a datastage director?
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?
What is the difference between orabulk and bcp stages?
What is active and passive stage?
What is the difference between odbc and drs stage?
why do u need the IOS upgradation in a FC switch
table actions available in oracle connector?
How will you load you daily/monthly jobs datas in to Fact and Dimension table using datastage.
client know skid info?
How do you generate sequence number in datastage?
How can we improve performance of data stage jobs?
How to reverse the string using unix?
1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?