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
options available in sequence job to run,validate?
How can one find bugs in job sequence?
What are data elements?
CHANGE CAPTURE
What is the differentiate between data file and descriptor file?
how to export or import the jobs in .ISX file
whom do you report?
Explain the datastage parallel extender (px) or enterprise edition (ee)?
Give an idea of system variables.
On which Dimension Table you implemented SCD Type in your Project
Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.
Explain the importance of surrogate key in data warehousing?
What is the difference between hashfile and sequential file?
What are the job parameters?
Describe routines in datastage? Enlist various types of routines.