Skip to main content
Question

List to attributes


marionmahot
Contributor
Forum|alt.badge.img+2

Hello everyone,
I performed a feature merger between two shapes and obtained a list from this transformer. My list is as follows:
insee: 11232
code: PTR
SURF: 11

insee: 11232
code: PPH
SURF: 15

insee: 11232
code: SPL
SURF: 23

insee: 15500
code: PPH
SURF: 2

insee: 15500
code: SPL
SURF: 555

So I want to assign the elements of the list to an attribute table (in columns). I have a maximum of 96 elements for a single code, so my resulting table will have many columns.
So I want to get this:
 

How should I do this?

THANKS

2 replies

takashi
Influencer
  • May 5, 2025

Hi ​@marionmahot ,

I assume that the input features look like this in the attribute table.

insee code SURF
11232 PTR 11
11232 PPH 15
...    

 

If it's correct, the following procedure could help you.

  1. AttributeManager: Create new attribute whose name is the value of “code” and whose value is the value of “SURF”
  2. AttributeExposer: Expost the new attributes names - i.e. “PTR”, “PPH”, etc.
  3. Aggregator (Group By: insee, Accumulation Mode: Merge Incoming Attribute): Aggregate the input features grouping by “insee”.
  4. AttributeManager: Remove unnecessary attributes.

The data flow looks like this.

 


marionmahot
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 6, 2025

Thank you so much


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