Skip to main content
Solved

Transpose rows to columns


friesewoudloper
Forum|alt.badge.img

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.

View original
Did this help you find an answer to your question?

7 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • 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
Influencer
  • Best Answer
  • April 13, 2019

Alternatively, this workflow also might help you.


friesewoudloper
Forum|alt.badge.img
takashi wrote:

Alternatively, this workflow also might help you.

Excellent! Thank you @takashi!

Forum|alt.badge.img+2

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


takashi wrote:

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
  • November 26, 2019
markatsafe wrote:

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
  • November 26, 2019
ramcgreg wrote:

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings