Skip to main content
Question

How do I concatenate several rows in one row?


peter100
Contributor
Forum|alt.badge.img+2

I have a table with multiple rows. Each line has a number. The number is appended to the column name. After that, each line should be appended to the other. The picture shows the starting table and the target.

 

tablerowsI've researched a lot but found nothing. Does anyone know how it works?

9 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • August 2, 2023

One possible way below. Because of the way the attributes are renamed, they need to be exposed later.

Concatenate_2


peter100
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • August 2, 2023

It works great! I don't understand why the Aggregator stores attributes in the background and lists are not generated.

I still have a lot to learn before I get such a great background knowledge! Thank you very much!


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • August 2, 2023

In this case the Aggregator does not create a list, because I did not set that option. The attributes are renamed before they enter the Aggregator, so they will all have unique names across all features. As the Aggregator is set to Merge Incoming Attributes, all attributes will be added to the aggregated feature.

And the attributes are not exposed because of the way they are renamed, so they need to be exposed later.


peter100
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • August 4, 2023

Thanks for that. The aggregator only creates a row. But I have over 300 rows. With the list function I dit not get useful results. What to do to get multiple rows?


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • August 4, 2023

In the Aggregator use Group By on the attribute(s) that determines which features belong to the same row.


peter100
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • August 4, 2023

tablerows2The picture shows a similar initial table.


peter100
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • August 4, 2023

The picture shows a similar initial situation (initial table).


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • August 4, 2023

Thank you for the new example data set.

I have marked the changes from the previous workspace:

Concatenate_2_GroupBy


peter100
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • August 4, 2023

I found the solution: In BulkAttributeRenamer keep modus origin attributes and remove Attrbute Exposer and Attribute Remover.


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