Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

how CAN we remove duplicates in dataset?

2 Answers   IBM,


8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?

0 Answers   Wipro,


what is the difference between 7.1,7.5.2,8.1 versions in datastage?

3 Answers   IBM,


Hi guys, please design a job with derivation(solution). write exact conditions. My requirement Source table emp_no qualification 1 a 1 c 2 a 3 c 3 b Target table emp_no qualification 1 b 2 b 2 c 3 a Here every employer have three qualifications i.e a,b and c. what ever source table dont have some qualification, that will be move to target table. Like above. Hope u get the point. Thanks.

4 Answers   UHG,


How a routine is called in datastage job?

0 Answers  






What can we do with datastage director?

0 Answers  


What all the types of jobs you developed?

0 Answers  


EXPLAIN SCD

0 Answers   CTS,


Explain briefly scd type2 in datastage7.5x2(parallel)

1 Answers   IBM,


What is exact difference between Parallel Jobs and server Jobs..

7 Answers   IBM,


What is difference between server jobs & parallel jobs?

0 Answers  


When we will go for Data elements?

3 Answers   TCS,






Categories