Solved

How to pivot or change the layout of a data table?

  • 20 October 2021
  • 3 replies
  • 5 views

Badge

I am trying to go from this:

initial_weather_table 

to this:

weather_tableWhere "Current Weather" is the first "validTime" record and "Next 24 hrs" is the second "validTime" record.

 

I messed around with the concept in excel and came up with the following which might work but can't seem to replicate it in FME:

pivot_excel 

I've played with the AttributePivoter, StatisticsCalculator, AttributeExploder, and others and just can't seem to alter the table to something similar to what is shown above. The idea would be to go from reading in arcgis server service features and write out to an html table (or maybe something else) which would look like (or similar to) the above table.

 

Any ideas are greatly appreciated!

 

icon

Best answer by virtualcitymatt 21 October 2021, 11:03

View original

3 replies

Userlevel 4
Badge +26

So the AttributeExploder is definitely needed here. Here's an example workflow

 

imageThe aggregator can then be used to get the data inline

Userlevel 4
Badge +26

So the AttributeExploder is definitely needed here. Here's an example workflow

 

imageThe aggregator can then be used to get the data inline

Here's what the output looks like

image

Badge

Your workflow worked for my needs. Thanks so much!

Reply