Skip to main content
Solved

Transposing data into a new table

  • March 20, 2019
  • 6 replies
  • 31 views

vuj001
Contributor
Forum|alt.badge.img+1

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

Best answer by ebygomm

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • Best Answer
  • March 20, 2019

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


takashi
Celebrity
  • 7843 replies
  • March 20, 2019

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.


vuj001
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • March 20, 2019

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

 

 


vuj001
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • March 25, 2019

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


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • March 25, 2019

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


vuj001
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • March 25, 2019

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