if a column contains data like
ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to
place names separated by commas in another columns how can
we do?

Answers were Sorted based on User's Feedback



if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / pranay

seq file ------> Transformer -------> target

1.extract the source data into seq file.
2.In transformer source column to target , and apply the field function
Field(column name, ',' , 1)
next same drag the source column to target , and apply the field function
Field(column name,',',2)
.
.
.
Field(column name,',',5)

Is This Answer Correct ?    8 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / vaibhav

Use Pivot Stage.

Is This Answer Correct ?    0 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / shar

Well the Question is not clear at the moment.
if ur question is
1)single col with single row like
name
ram,rakesh,madhan,suraj,pradeep,bhaskar
then
ur requirement of asking is again this?
like
ram,rakesh,madhan,suraj,pradeep,bhaskar
or
2)single col with multiple rows like
ram
rakesh
madhan
suraj
pradeep
bhaskar
and u want o/p like ram,rakesh,madhan,suraj,pradeep,bhaskar.
Then praney anwer doesn't suite to get output.
neither u can use pivot stage using vertical pivoting bec
what will u pivot and group by.... not possible.
Finally one way is:

Use SeqStg-->ColGen-->Tx-->RemDup-->Dataset.
At colgen give a new column and assign 1 to all rows and
send the result to tx.
At tx take three variables and expressions to concatenate
the input with the help of colgen new column.
Hint: If sv1 <> sv3 Then DSLink45.cname Else sv2 : ',' :
At RemDup specify Last value
And finally u will the output.

Still if u dont get what i explained just mail me
shharrath@yahoo.com

Is This Answer Correct ?    0 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / santhu

Then We have to concatenate by using concatenation operation with comma(,)in transformer

Is This Answer Correct ?    1 Yes 2 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / abhishek

No Need of fileds and all extraact al the columns in
transfarmerstage create a new column in transe as exprestion
col1,col2,col3 and load it

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Data Stage Interview Questions

Hi , Today 1000 records updated, tomorrow 500 records updated how to find that?

4 Answers   Wipro,


How do you start developing a datastage project?

0 Answers  


5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10

4 Answers  


In which situations we can use normal and sparse lookup stages

4 Answers   IBM,


What is the flow of loading data into fact & dimensional tables?

0 Answers  






How to exclude first and last lines while reading data into a sequential file(having some 1000 records).I guess probably by using unix filter option but not sure which to use

6 Answers   IBM,


What are the areas of application?

0 Answers  


i have a scenario with i/p as ID,salary with values 1,1000 2,2000 and 3,4000 i need an extra column in the o/p named amount with values 2000,4000 and NULL. how can i get it?

2 Answers   L&T,


what is the difference between INROWNUM AND OUTROWNUM IN DATASTAGE SERVER EDITION?

2 Answers  


Hai..,This is Kiran M. What is D/B Change Capture stage and Difference stage?

2 Answers  


can any 1 put a difference between datastage 7.5 and 8.0 all concepts plz r mail 2 me anu4u09@gmail.com

4 Answers   IBM,


How many Nodes configuration file you used in your last project?

1 Answers  


Categories