Skip to main content

I'm reading a source file and this is the output.

What I would like to have instead is only one row per Name and then have one column for each number of months (as attribute name) and its RRP (as attribute value).

The columns should be the following:

header/attributes:

Name ; 3-Months-RRP ; 6-Months-RRP ; 9-Months-RRP ; 12-Months-RRP

values:

AR201130 ; 5.82; 11.64 ; 17.46 ; 19.40

Thanks for your help.

I believe the AttributePivoter transformer should be able to do this.


Hi @kat

Did you try to use the custom transformer AttributeTransposer?

Thanks,

Danilo


Hi @kat, I often use a combination of BulkAttributeRenamer and Aggregator for this kind of task. The AttributeCreator can alto be used to create a new attribute named "@Value(NumberOfMonths)-Months-RRP" storing the value of "RRP", instead of the BulkAttributeRenamer.