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
Why do you need stage variables?
WAT TYPE OF PL/SQL QUERRYS USED IN DATASTAGE
project Steps,hits, Project level HArd things,Solved methods?
Differentiate between operational datastage (ods) and data warehouse?
State the difference between an operational datastage and a data warehouse?
in oracle target stage when we use load option and when we use upsert option?
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
how many rows sorted in sort stage by default in server jobs
What is the importance of the exception activity in datastage?
Define repository tables in datastage?
What is the roundrobin collector?
Why we use surrogate key?
What is process model?
Differentiate between datastage and informatica?
How complex jobs are implemented in datstage to improve performance?