Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


in datastage interview qustion

source target
------- -------
12345 1
2
3
4
5

Answers were Sorted based on User's Feedback



in datastage interview qustion source target ------- ---..

Answer / 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

in datastage interview qustion source target ------- ---..

Answer / np

Use Pivot stage

Is This Answer Correct ?    1 Yes 1 No

in datastage interview qustion source target ------- ---..

Answer / lajpat kurdiya

SELECT SUBSTR(12345,LEVEL,1) AS Source
FROM DUAL
CONNECT BY LEVEL <= LENGTH(12345);


SELECT SUBSTR('12345',LEVEL,1) AS Source
FROM DUAL
CONNECT BY LEVEL <= LENGTH('12345');

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

how can u handle null values in transformer stage.

7 Answers  


Which commands are used to import and export the datastage jobs?

0 Answers  


Differentiate between odbc and drs stage?

0 Answers  


SOURCE LIKE I_D,F1,F2 --------- 100,N,Y 100,N,N 100,Y,N 101,Y,Y 101,N,Y 102,Y,N 103,N,N 104,Y,Y 105,N,N 106,N,Y 102,N,Y 105,Y,Y O/P LIKE ID flag1 flag2 101 Y Y 101 N Y 102 Y N 102 N Y 104 Y Y 106 N Y

4 Answers  


Explain usage analysis in datastage?

0 Answers  


What are the types of containers and how to create them?

0 Answers  


Triggers,VIEW,Procedures

0 Answers   CTS,


Does datastage support slowly changing dimensions ?

0 Answers  


1)Source file contains one record, I want 100 records in target file.

3 Answers  


What are orabulk and bcp stages?

0 Answers  


Can aggregator and transformer stages use to sort the data? How ?

2 Answers  


how to sort two columns in single job in datastage.

0 Answers   TCS,


Categories