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
How do you import and export data into datastage?
How do you reject records in a transformer?
How to RD using transformer?
Differentiate between datastage and informatica?
What is the importance of the exception activity in datastage?
Why do you need stage variables?
What is a quality stage in datastage tool?
Could anyone give brief explanation bout datastage admin
Define Job control?
Which algorithm you used for your hashfile?
Can you define merge?
How to reverse the string using unix?
Explain how a source file is populated?
1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)
What are the different kinds of views available in a datastage director?