Skip to main content
Apologies for cross posting.

 

 

 

What i'm trying  to achieve is from this Excel table

 

 

-----------------------------------

 

| Name     |  Listed_Item    |

 

-----------------------------------

 

| Mr A     |  /1234]                  |

 

| Mr B     |   6352],  2344]    |

 

-----------------------------------

 

 

TO

 

 

-----------------------------------

 

| Name     |  Listed_Item |

 

-----------------------------------

 

| Mr A     |   1234               |

 

| Mr B     |   6352               |

 

| Mr B     |   2344               |

 

-----------------------------------

 

 

 

I using StringReplacer to remove the "Â ]". Beyond that, I not sure how to go abt it.

 

If anyone can just point to me the transformers needed to produce this.

 

 

Thanks.
Hi,

 

 

You might want to use the AttributeSplitter.

 

 

Regards,

 

 


Hi,

 

After removing the ] and using the attribute splitter as Klaas mentioned, followed it by a list exploder and copying the _list value back to the listed item attribute. you can write it back into a xls.

 

Hope this helps,

 

Itay

 

 
Lets see if I can post an FME-workspace directly in this forum. Just Copy-paste this in FME-workspace and - voila you have a suggested solution with StringReplacer.

 

 

Code to Copy-Paste into an FME-Workspace can be found: http://pastebin.com/zUjxh1Rj

 

 

 


Thanks for the pointer guys. i used AttrbuteSplitter and then ListExploder  and it works!

 

 

Thanks again.
I have a similar issue to "qed".  But I need help at the list_exploder and beyond.  Itay says copy "the _list value back to the listed item attribute but I can't figure out how to do that.  So here is my problem:  I have 1150 records in this format

 

 

|Rel_ID|From_road_ID|To_Road_ID|MidCount|Mid_links|

 

|1000|12|89|1|56|

 

|2000|98|21|2|34,45|

 

 

What I want is this:

 

|Rel_ID|Road_ID|Sequence|

 

|1000|12|1|

 

|1000|56|2|

 

|1000|89|3|

 

|2000|98|1|

 

|2000|34|2|

 

|2000|45|3|

 

|2000|21|4|

 

 

So I want to split out the attributes in "MidLinks" add them back as a new record with the original attributes from its record.  I've got AttributeSplitter and List Exploder there but I don't understand why when ListExploder runs it only adds 2 records (there is something I don't fully understand about _list in FME)  and as I mentioned the discussion dropped off before ListExploder was explained fully and SigTil's upload of the workspace example didn't seem to work so now I am lost.

 

 

Could someone continue the discussion re "copying the _list value back to the listed item attribute"?

 


I have a similar issue to "qed".  But I need help at the list_exploder and beyond.  Itay says copy "the _list value back to the listed item attribute but I can't figure out how to do that.  So here is my problem:  I have 1150 records in this format

 

 

|Rel_ID|From_road_ID|To_Road_ID|MidCount|Mid_links|

 

|1000|12|89|1|56|

 

|2000|98|21|2|34,45|

 

 

What I want is this:

 

|Rel_ID|Road_ID|Sequence|

 

|1000|12|1|

 

|1000|56|2|

 

|1000|89|3|

 

|2000|98|1|

 

|2000|34|2|

 

|2000|45|3|

 

|2000|21|4|

 

 

So I want to split out the attributes in "MidLinks" add them back as a new record with the original attributes from its record.  I've got AttributeSplitter and List Exploder there but I don't understand why when ListExploder runs it only adds 2 records (there is something I don't fully understand about _list in FME)  and as I mentioned the discussion dropped off before ListExploder was explained fully and SigTil's upload of the workspace example didn't seem to work so now I am lost.

 

 

Could someone continue the discussion re "copying the _list value back to the listed item attribute"?

 

Once concatenate From_road_ID, Mid_links, and To_road_ID with comma delimitted, and then you can apply the combination of AttributeSplitter and ListExploder.

 


Reply