I/P

---



ID Value

1 AB
2 ABC
3 ADE
4 A

O/p
---
ID Value
1 A
1 B
2 A
2 B
2 C
3 A
3 D
3 E
4 A

Answers were Sorted based on User's Feedback



I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / subbuchamala

SRC-->TFM--->TGT
in TFM, Use Stage variables and Loop variables as below:

StageVar-->Len(Lnk.Value)===>this will give length of string of "Value" column. i.e.,
ID Value StageVar

1 AB 2
2 ABC 3
3 ADE 3
4 A 1

Next, in the Loop variable part:
Loop While==> @ITERATION<= StageVar
For each input row, Loop will repeat until "Value" length finishes.

Add new Loop variable-->LoopVar and put below derivation:
Left(lnkCstIPSGMSPread.IJABL, @ITERATION)-->LoopVar

Next, in the Output Col Derivation:
Lnk.ID-->ID
LoopVar-->Value

Finally, you will required Output.

Is This Answer Correct ?    4 Yes 0 No

I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / mohanasam

please clarify the answer? Vinod

Is This Answer Correct ?    0 Yes 1 No

I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / upputuri.vinod

first of all we have to split the value into individual char
value(1,1) v(2,2) v(3,3)
c1 c2 c1 c2 c3 c4
1 AB 1 A B
2 ABC---> 2 A B c----> pivot--->o/p
3 ADE 3 A D E
4 A 4 A

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Data Stage Interview Questions

Differentiate between Join, Merge and Lookup stage?

0 Answers  


i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra column in the o/p named avg(salary)how can i get it?

4 Answers   L&T,


How can we move a DATASTAGE JOB from Development to Testing environment with the help of a datastage job using unix commands.

5 Answers  


How can we run same job in 1 day 2 times

4 Answers   IBM,


when will you go for dataset and fileset?

2 Answers   Accenture,






hi i am bhavani, in real time data stage who is the source provide? and how to recevied in developer? Pls send me answer

1 Answers   Polaris,


I have load a Dataset in UAT with 2 Node configuration, imported the job into PROD environment which is 4 node configuration and using this DataSet as SRC to other job. will the job run fine or give any errors? If job runs fine, on how many nodes? 2 nodes or 4 nodes?

2 Answers   TCS,


Explain the datastage parallel extender (px) or enterprise edition (ee)?

0 Answers  


how to identifie,is it innerjoin,leftouter join in lookup?

2 Answers   Hexaware,


why do u need the IOS upgradation in a FC switch

0 Answers   IBM,


what is advantages of snowflake when it is used?

3 Answers   IBM,


What are the environmental settings for data stage,while working on parellel jobs?

2 Answers   Satyam,


Categories