Skip to main content

I know this has been asked many times, but i cannot get it to work.

 

My data is:

 

ObjectCategoryNumApple8091Apple

 

81122Apple8100Banana80913Banana81014Banana81155

 

And i want to turn it into

 

Object809810811Apple1022Banana131455

 

I've tried to do the method i've read on the forums using attributecreator, however, its not creating multiple columns based on the column names.

ie, in AttributeCreator:

NewAttribute: @Value(Category)

AttributeValue: @Value(Num)

doesnt do anything.

 

I am using FME 2019.

 

 

Have you exposed the column names after creation?


There is a more complex way that could work following these steps:

1 - ListBuilder:

GroupBy: Object

Add to List: Selected Attributes

Selected attributes: Category, Num

 

2 - ListKeyValuePairExtractor:

Attribute Name List: _yourList{0}.Category

Attribute Value List: _yourList{0}.Num

 

3 - AttributeExposer

 


Reply