Skip to main content

I am trying to get from a table like this example:

Inputto this table:

OutputI have searched for answers but can't fully seem to get where I need to be- including trying variations of attribute transposer, attribute exploder, attribute exposer, and attribute pivot (this helped me get closer to the answer but didn't allow for text..). Any advice would be much appreciated!

  • AttributeCreator to create attributes from attributes
    • Set Parameter as AttributeName
    • Set Value as AttributeValue
  • AttributeExposer to expose attributes created in previous step
    • Expose attrributes colour, lenght, thickness, broken
  • Aggregator to merge the rows with same objectid in one line.
    • Group by ObjectId
    • Merge attributes.

 

Exposing the attributes can not be done automatically. If you want to do this automatically you can use a SchemaScanner and write the data dynamic.


  • AttributeCreator to create attributes from attributes
    • Set Parameter as AttributeName
    • Set Value as AttributeValue
  • AttributeExposer to expose attributes created in previous step
    • Expose attrributes colour, lenght, thickness, broken
  • Aggregator to merge the rows with same objectid in one line.
    • Group by ObjectId
    • Merge attributes.

 

Exposing the attributes can not be done automatically. If you want to do this automatically you can use a SchemaScanner and write the data dynamic.

Thank you for a prompt response. This successfully creates the columns, however values are still in the value column rather than in the corresponding columns created. Is there something I am missing?

Process1Thank you in advance.


Thank you for a prompt response. This successfully creates the columns, however values are still in the value column rather than in the corresponding columns created. Is there something I am missing?

Process1Thank you in advance.

Almost there. In the AttributeCreator, you need to click the second arrow, select Attribute Value, then Paramater, so the field displays @Value(Parameter).


Thank you for a prompt response. This successfully creates the columns, however values are still in the value column rather than in the corresponding columns created. Is there something I am missing?

Process1Thank you in advance.

thank you so much!! it has worked :)


Thank you for a prompt response. This successfully creates the columns, however values are still in the value column rather than in the corresponding columns created. Is there something I am missing?

Process1Thank you in advance.

Cheers :)


An alternative way (because it is nice to have a choice):

  • Create a list (ListBuilder)
  • Extract the key value pairs (ListKeyValuePairExtractor from FME Hub)
  • Expose the attributes (AttributeExposer)

Transpose


An alternative way (because it is nice to have a choice):

  • Create a list (ListBuilder)
  • Extract the key value pairs (ListKeyValuePairExtractor from FME Hub)
  • Expose the attributes (AttributeExposer)

Transpose

Thank you! love having an alternative too!


Reply