Skip to main content
Question

Transposing data - Reverse of the transformer AttributeExploder

  • January 31, 2025
  • 4 replies
  • 56 views

hnahoulder
Contributor
Forum|alt.badge.img+2

Hello Community,

I have data in the following format:

Attribute value
field1 a
field2 b
field3 c
field1 e
field2 f
field3 g
field1 j
field2 k
field3 l

Which transformer can I use to transpose my data into this format?

 

field1 field2 field3
a b c
e f g
j k l

 

The names field1, field2, and field3 can be dynamic, and their number may also vary

4 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • January 31, 2025

Do you have an attribute that defines what feature each row belongs to?


hnahoulder
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 31, 2025

The data follows a repeating pattern where every three (or N) rows correspond to one record. However, there is no explicit attribute that groups them. But  I can generate a column like objectid
 

Attribute value
objectid 1
field1 a
field2 b
field3 c
objectid 2
field1 e
field2 f
field3 g
objectid 3
field1 j
field2 k
field3 l

becchr
Influencer
Forum|alt.badge.img+25
  • Influencer
  • January 31, 2025

If you have an objectid to define the rows, and you know the fieldnames a flow like this should work:

I’ve attached a workspace based on your example, hope this helps


hnahoulder
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 31, 2025

Thank you, ​@becchr  for your help, but my problem is that I don’t know the field names because they are dynamic, so I can’t expose them


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