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

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


Please Help Members By Posting Answers For Below Questions

Why do you need stage variables?

1133


WAT TYPE OF PL/SQL QUERRYS USED IN DATASTAGE

3608


project Steps,hits, Project level HArd things,Solved methods?

2065


Differentiate between operational datastage (ods) and data warehouse?

1119


State the difference between an operational datastage and a data warehouse?

1057


in oracle target stage when we use load option and when we use upsert option?

2207


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

725


how many rows sorted in sort stage by default in server jobs

3933


What is the importance of the exception activity in datastage?

1018


Define repository tables in datastage?

1100


What is the roundrobin collector?

1040


Why we use surrogate key?

1159


What is process model?

1921


Differentiate between datastage and informatica?

1141


How complex jobs are implemented in datstage to improve performance?

964