Skip to main content
Question

group by and retaining none grouped data.

  • September 4, 2014
  • 4 replies
  • 34 views

Forum|alt.badge.img
Hi,

 

 

This scenario has come about quite a few times already, but I have not been able to figure it out.

 

 

I have the following excel input data and want to produce the following output data. Please help me out using some Transformers. We are using FME Desktop 2013 SP2.

 

 

Sample input data (Reader)

 

 

First Name ¦ Surname ¦ Date ¦ Type

 

John ¦ Smith ¦ 01/05/2000 ¦ A

 

Joe ¦ Bloggs ¦ 01/01/2000 ¦ A

 

Joe ¦ Bloggs ¦ 10/05/2010 ¦ B

 

 

¦ means a new field.

 

 

Expected output data (Writer)

 

 

First Name ¦ Surname ¦ Dates ¦ Types

 

John ¦ Smith ¦ "01/05/2000" ¦ A 

 

Joe ¦ Bloggs ¦ "01/01/2000" , "10/05/2010" ¦ "A" , "B" 

 

 

Resulting Output.

 

I basically want to group some attributes to make unique names and then concatenate the remaining none-grouped attributes in turn into new attributes. Also need to consider that in the real input data there could be more than 2 people with the same name. 

 

 

Thanks.

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • September 4, 2014
Hi,

 

 

You can use the Aggregator to concatenate non-grouped attributes even if the features don't have geometry. Look at "Attributes to Concatenate" and "Separator Character" parameter of the transformer.

 

 

Takashi

Forum|alt.badge.img
  • Author
  • September 4, 2014
Thank you Takashi.

 

I have tried the following settings and it doesn't work.

 

 

I have run with both Keep input attributes Yes/No and its not grouping or concatenating.

 

Out data stays the same as follows:

 

First Name ¦ Surname ¦ Date ¦ Type

 

John ¦ Smith ¦ 01/05/2000 ¦ A

 

Joe ¦ Bloggs ¦ 01/01/2000 ¦ A

 

Joe ¦ Bloggs ¦ 10/05/2010 ¦ B

 

 


takashi
Celebrity
  • September 4, 2014
Check if the names (Joe Bloggs) are really identical including character case, white space etc.. Other transformers e.g. ListBuilder can group them?

Forum|alt.badge.img
  • Author
  • September 4, 2014
Thank you very much for the help. All sorted.