TransWikia.com

Build list attribute by compressing existing one in FME

Geographic Information Systems Asked by pfadenhw on February 25, 2021

I currently have an attribute table that is exploded – attribute A is repeated for each unique value of attribute B. But I want to "compress" attribute A and change attribute B to a list – so that the new table has only unique values of A and all of the corresponding unique values for B are complied in a comma delimited list attribute (so they’re all in the same cell).

One Answer

I think the Aggregator transformer will do what you need here. Set it up to aggregate with a Group-By on attribute A, and attribute B is the "Attribute to Concatenate"

enter image description here

With that you'll get a separate feature for each unique A value, with all of the B values in a comma-separated list.

I'm not sure if you wanted a real FME list, or just a plain attribute with a comma-delimited list. My version is just a plain attribute, but to get an FME style list, just check the box for Generate List.

Here's the results. I'm hoping this is what you wanted:

enter image description here

Correct answer by Mark Ireland on February 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP