Hello All,
Is there a way in FME to transform the CSV table here below:
into this:
Thanks!
Hello All,
Is there a way in FME to transform the CSV table here below:
into this:
Thanks!
Best answer by fmelizard
Interesting question. When I looked at this I was reminded of the AttributePivoter, which made a debut in FME a couple years back. It does exactly what is desired -- it can collapse a set of rows into a single one, and add new columns (attributes) whose name comes from one older column and whose value is a statistical calculation of another.
I've attached a template that does this. Note -- this only works if the "value"s are numeric. I believe this is so in the input, despite seeing a comma as the decimal separator. If not, it is easy to string substitute a , with a . , do the pivot, and then substitute back again.
It is a bit tricky to set this up and you do need to set your writer to be in "dynamic" mode, but check all the settings in the attached and they should get you pointed the right way.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.