Skip to main content

Hi!

 

I am trying to solve a task where I need to turn table rows into columns where their corresponding attribute values would be transposed altogehter. The essential moment is that there is n number of repeating rows (in my case every 3 rows) in the key column which would be layed out as attribute three (3) columns with respective attribute names as explained below:

 

Original schema: ............................................... Wished result:

Transpose_table 

I manage to transpose the table, however I encounter a set of challenges in finilizing formatting of the table:

  1. The hidden attributes cannot be dynamically exposed (of course), however setting them as User parameters for semiautomatic processing does not seem to work either as AttributeExposer picks up parameter name and not the value given by the user (ver. 2020.1).
  2. After table transposal attribute values that share the same name become separate columns (eg. Rad1(1), Rad1(2)...). I wonder what procedual steps I should follow in order to rearrange (aggregate?) columns by moving attribute values under the original unique column name?

 

Thanks for ideas and suggestions.

Cheers!

 

 

Hi @vadis​ 

I'm not certain how your workspace is configured but I find it helpful to create the desired output attributes before aggregating. Doing this avoids using lists and thus having to manually create attributes from lists. It should also avoid the second issue you're seeing. I've attached an example workspace with this approach.

 

As for exposing the newly created attributes, I'm not able to replicate the behaviour you're seeing. I would also like to mention, AttributeExposer now has the ability to expose attributes from feature caches! It may be another avenue you can explore for semiautomatic processing.

Edit: dynamic workflows may also be another method you can explore


Reply