Skip to main content
Question

Columns to Rows in FME2019


Forum|alt.badge.img

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.

 

 

2 replies

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • December 4, 2019

Have you exposed the column names after creation?


oscard
Influencer
Forum|alt.badge.img+21
  • Influencer
  • December 4, 2019

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

 


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