Solved

Transposing data into a new table

  • 20 March 2019
  • 6 replies
  • 3 views

Badge

Hi,

I would like to transpose data into a new table. My input table is:

CODE VALUE_1 VALUE_2

 

C1 11 22

 

C2 33 44

 

C3 55 66

 

My output table should be:

 

C1-VALUES_1 C1-VALUES_2 C2-VALUES_1 C2-VALUES_2 C3-VALUES_1 C3-VALUES_2

 

11 22 33 44 55 66

 

 

This is what I have done so far.

 

Please see attached my workspace.

Thanks,

 

Jeffrey

 

 

Cc: @takashi
icon

Best answer by ebygomm 20 March 2019, 21:53

View original

6 replies

Userlevel 1
Badge +21

I'd use this sort of workflow - where you create new attributes based on the attribute values, expose them and then aggregate

25832-table-transpose.fmw

Userlevel 2
Badge +17

I'd use this sort of workflow - where you create new attributes based on the attribute values, expose them and then aggregate

25832-table-transpose.fmw

Basically the same approach, but I prefer to use the BulkAttributeRenamer.

Badge

@egomm & @takashi: Thank you so much for your quick response/ help!

 

 

Badge

@egomm & @takashi: Since the CODE is a dynamic list, what's the best way to avoid the hard code step in the AtrtibuteExposer transformer? Thanks.

Userlevel 1
Badge +21

@egomm & @takashi: Since the CODE is a dynamic list, what's the best way to avoid the hard code step in the AtrtibuteExposer transformer? Thanks.

What is your final destination for the data? It's not possible to avoid the attributeexposer if you need the attributes available in the workspace, but it is possibly to write them to a destination format without knowing them in advance.

Badge

@egomm & @takashi: Since the CODE is a dynamic list, what's the best way to avoid the hard code step in the AtrtibuteExposer transformer? Thanks.

I plan to save the output data in Excel for now.

Reply