Skip to main content
Solved

How to: Transposing/concatenating problem.


Can't wrap my head around the following reformatting problem. My data looks like this:

Pointid substance1 substance2 substance3...

1 value

2

3

I have a lot of columns in the original data, almost 200 different substances. I would like to achieve the following structure (below) where Substances attribute contains all values of 200 substance columns and is exploded for each Pointid. So basically every Pointid is replicated for each substance and values column have the value of each substance. I've tried multiple combinations of transformers but without result.

Pointid Substances values

1 Substance1 value

1 Substance2 ...

1 Substance3

2 Substance1

2 Substance2

...

Best answer by nielsgerrits

nielsgerrits wrote:

I think you can solve this with an AttributeExploder.

Attached sample workspace.

AttributeExploderSample

View original
Did this help you find an answer to your question?

4 replies

nielsgerrits
VIP

I think you can solve this with an AttributeExploder.


nielsgerrits
VIP
  • Best Answer
  • January 28, 2022
nielsgerrits wrote:

I think you can solve this with an AttributeExploder.

Attached sample workspace.

AttributeExploderSample


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 28, 2022

Hi @japeki​ , alternatively you can use the ListPolulator to populate all the values of Substance* attributes into a list attribute.

listpopulator-example 


  • Author
  • February 15, 2022
nielsgerrits wrote:

Attached sample workspace.

AttributeExploderSample

This seemed to work thank you! I've tried AttributeExploder before but somehow didn't get the same result.


Reply


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