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...

Question
4)
source target

c1 c1 c2 c3
c2 c4 c4 c5
c3 c6 c7
c4
c5
c6
c7


Singal Source and Singal Target only subash,

Answer Posted / shar

HERE IS Mine answer an alternative without pivot stage:

SRC-->TX1-->TX2-->RemDup-->TRG

from SRC send data to TX1 with RowNumCol
then Data :
col1 Row_Num
c1 0
c2 1
c3 2
c4 3
c4 4
c5 5
c6 6
c7 7

Now in Tx1 take stage variable sv1 and using Row_Num field
give condition as : If Row_Num >=0 And Row_Num <3 Then 1
Else If Row_Num >= 3 And Row_Num <6 Then 2 Else 3
o/p :
col1 col2
c1 1
c2 1
c3 1
c4 2
c4 2
c5 2
c6 3
c7 3

(If you don't know Vertical Pivoting then alternatively we
use another Transformer and Remove Duplicate stages to get
our result)

now at Tx2 we take Three Stage Variables sv1 sv2 sv3 all are
varchar
now we give proper conditions to concatinate input using col2.
Stage variables: Assignment
col2---sv1
If sv1 <> sv3 Then col2 Else sv2 : ',' : col2 --- sv2
col2---sv3

Now at this level u should get o/p as:

newcol1 newcol2
1 c1
1 c1,c2
1 c1,c2,c3
2 c4
2 c4,c4
2 c4,c4,c5
3 c6
3 c6,c7

Finally use Rem Duplicates by selecting
Duplicates to Retain : Last
o/p
1 c1,c2,c3
2 c4,c4,c5
3 c6,c7

(Just in case if you dont want 1st column just drop it using
modify stage or copy stage.)
Yeah i know its a lengthy way and it sucks,
out of curiosity did it mannnnn.
Better use Pivot stage -a wonderful stage

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks

1473


What is difference between join, merge and lookup stage?

1039


What is the difference between odbc and drs stage?

1042


What is data partitioning?

1136


Notification Activity

1348


What is orabulk stage?

991


What is active and passive stage?

1360


Define APT_CONFIG in Datastage?

1019


file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

887


Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?

2176


What are the functionalities of link collector?

1036


What are sequencers?

1056


How do you schedule or monitoring the job?

1133


Can anyone tell me a difficult situation who have handled while creating Datastage jobs?

3211


How do you generate sequence number in datastage?

1025