Skip to main content
Solved

Transpose rows to columns

  • April 13, 2019
  • 7 replies
  • 1137 views

friesewoudloper
Participant
Forum|alt.badge.img+1

This is my dataset:

ZwemplekVoorzieningAanwezigAAAAToilettenjaAAAAHorecajaAAAADouchesneeAAAAEHBOjaAAAAParkeerplaatsneeBBBBToilettenneeBBBBHorecaneeBBBBDouchesneeBBBBEHBOjaBBBBParkeerplaatsneeCCCCHorecajaCCCCDouchesjaCCCCEHBOjaCCCCParkeerplaatsja

 

The number of rows in the input dataset may vary or the order of the rows may change.

How do I transpose the rows to columns?

My resulting dataset should be like this:

 

ZwemplekToilettenHorecaDouchesEHBOParkeerplaatsAAAAjajaneejaneeBBBBneeneeneejaneeCCCCjajajajaja

 

Best answer by takashi

Alternatively, this workflow also might help you.

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.

7 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • April 13, 2019

Hi @friesewoudloper

There is a insteresting link and Workspace template that I believe is good in your case:

 

https://knowledge.safe.com/articles/31701/transpose-a-table-using-fme.html

 

Thanks,

Danilo


takashi
Celebrity
  • 7843 replies
  • Best Answer
  • April 13, 2019

Alternatively, this workflow also might help you.


friesewoudloper
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • 50 replies
  • April 17, 2019

Alternatively, this workflow also might help you.

Excellent! Thank you @takashi!

Forum|alt.badge.img+2
  • 1891 replies
  • April 22, 2019

Great solution from @takashi so I've added the example workspace and data so others can reference it. (FME 2018.1): tabletranspose.fmwt


Alternatively, this workflow also might help you.

Hello Mr. Takashi,

I was trying to use your example for my dataset but it is not working at all. I am a student at Niagara College Canada and working on thermal analysis for my thesis to create heatmaps for which I need the data matrix. The data is similar to the data shown. I have attached my template in order to give you a better idea of what I did. It would be really great of you if you could help me find a solution to my problem.

 

 

matrix.fmwt


Forum|alt.badge.img
  • 30 replies
  • November 26, 2019

Great solution from @takashi so I've added the example workspace and data so others can reference it. (FME 2018.1): tabletranspose.fmwt

This is the output I get when I run that. Is this right? FME 2019.

It looks as though AttributeCreator is not creating any fields, so it's not providing the desired output table.

I have not been able to get AttributeCreator to create fields from values in another field when testing on my own data.

Thank you,

Randy McGregor


Forum|alt.badge.img+2
  • 1891 replies
  • November 26, 2019

This is the output I get when I run that. Is this right? FME 2019.

It looks as though AttributeCreator is not creating any fields, so it's not providing the desired output table.

I have not been able to get AttributeCreator to create fields from values in another field when testing on my own data.

Thank you,

Randy McGregor

@ramcgreg The attribute isn't displayed in the Table, but if you check the Feature Information window it is there. Just not added to the workbench schema which populates the table view.