Skip to main content
Question

post a question

  • March 28, 2014
  • 5 replies
  • 54 views

Forum|alt.badge.img
I have a large spreadsheet that looks like something like that:

 

 

 

Species                        Attribute_1    …    Attribute-n     Status_1    Status_2

 

Acarospora fuscata             aa           …          qe               VU            NS

 

Micarea misella                   xt           …          qq               CR            NR

 

Porpidia striata                   dd           …           rt                CR            NR

 

Verrucaria viridula                po           …          da               EN            NS

 

            …                          …            …          …               …             …

 

 

Is there a way in FME to obtain the following? The date above has to go to a another database that only accepts the next structure:

 

 

Species                        Attribute_1    …    Attribute-n     Statuses

 

Acarospora fuscata             aa           …          qe               VU

 

Acarospora fuscata             aa           …          qe               NS

 

Micarea misella                   xt           …          qq               CR

 

Micarea misella                   xt           …          qq               NR

 

Porpidia striata                   dd           …           rt                CR

 

Porpidia striata                   dd           …           rt                NR

 

Verrucaria viridula               po            …          da               EN

 

Verrucaria viridula               po            …          da               NS

 

            …                         …            …           …               …

 

 

 

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.

5 replies

david_r
Celebrity
  • March 28, 2014
Hi,

 

 

look at the ListPopulator and the ListExploder.

 

 

David

takashi
Celebrity
  • March 28, 2014
Hi Darius,

 

 

If the number of Statuses are not so many, you can branch the feature flow into some streams, rename "Status_*" to "Statuses", and then write them together into the destination dataset.

 

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 28, 2014
Or

 

 

Build 2 lists: list1 grouped by Species and status1 and list2 grouped by Species and status2.

 

Use listrenamer to rename list2/status2 to status1 (or visa versa)

 

Merge the lists.

 

Explode.

 

 

 

 

Gio

takashi
Celebrity
  • March 29, 2014
An element of list attribute can be considered as a non-list attribute whose name contains sequential number surrounded by curly braces. So, in some case, renaming could be a simple way to build a list attributes.

 

 


Forum|alt.badge.img
  • Author
  • March 31, 2014

Thanks guys for your answers.

 

 

I have tried all the options and the one which has worked quicker it has been Takashi's one about creating two streams from the reader and then merge them again into the writer. The list thing also works but it's slighter longer.

 

 

Regards,

 

 

Dario