Pivoting of the records

Source: target:
col1 col2 col1 col2

a 1 1 a,b,c,d
b 1 2 p,q,r
c 1 3 x
d 1
p 2
q 2
r 2
x 3
how to do this...
Thanks,
krishna.

Questions by krishnaadapa

Showing Answers 1 - 9 of 9 Answers

Visal

  • Aug 13th, 2016
 

Use Sequence generator transformation and use Sorter to order this SEQ_NO column in desc order.

  Was this answer useful?  Yes

suresh

  • Apr 30th, 2017
 

I have to pivot the source data from column to rows till "transform" value, "transform" value can occurs any one of the columns, please advice me suggestions, Can any one help me how to achieve the below output. This has to achieve in server job.

input

column1,column2,column3,column4,column5,column6,column7,column8
a;;anil;n;0;8;0,b;;balu;>=0;4;66;07,c;;charan;acount;33;00;99,d;;danush;d;34;00,e;;evil;55;00;56,f;;fhani;<=0;00;77,t;;transfirm;dg;99;40;00,h;;hemanth;34;00;55
a;;akhil;a;67;00,b;;banu;n;34;00;23,c;;chandu;0;34;89;00,d;;danalakshmi;<=0;34;78;00,t;;transfirm;0;34;56;00,f;;funny;08;00;25,g;;guru;89;00;34,h;;harish;<=0,89;34;00


output

column1,column2
anil,n
balu,>=0
charan,acount
danush,d
evil,55
fhani,<=0
transfirm,dg
-----------
akhil,a
banu,n
chandu,0
danalakshmi,<=0
transfirm,0

  Was this answer useful?  Yes

rashmi

  • Aug 12th, 2017
 

we can use aggregator transformation.say col1=Nme,col2=ID
Make new_name and new_no as variable port.Specify condition as New_name=IIF(new_no=ID,new_name||,||name,name)
new_no=ID
Give one output port say Output_name =New_name

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions