My Workspace two Source : 1 feature of line and a Excel file with 3 features.
The goal is bring the attributes of the XLS into a line.
How can you see in my Template file, i used the FeatureMerger and after ListExploder.
I have 3 lines but i need just one with all attributes.
Attached my Workspace.
Thanks,
Danilo
Best answer by nathanatsafe
Hi @danilo_inovacao. I thought I'd try your problem as well!
Using a ListBuilder before the FeatureMerger keeps the output features to 1 while retaining all three attributes from the XLS features. The attached workspace results in the following single line feature, where the values 2, 1, 0 represent your city names:
Perhaps this is the result you're looking for? Don't forget that the list attribute output can be manipulated in lots of ways. Check out this series of tutorials for a ton more information on lists in FME.
I agree with @erik_jan, you may want to avoid the ListExploder here.
For some use cases you may not want to concatenate all the suppliers, perhaps you just want one of them. In those cases you could e.g. use a ListSorter to "bubble" your preferred item to the top of the list and then use a ListIndexer to only keep that particular item.
Also a quick tip for the FeatureMerger: you don't have to create a separate join attribute if it's static, you can simply type something into the "Join on" fields, e.g. if usually just type "1" into both for an unconditional merge:
Use the ListExploder like your original workspace. However, you will have to set "Use List Attribute Values" to the Conflict Resolution parameter, or set "Only Use List Attributes" to the Accumulation Mode parameter..
Use the ListExploder like your original workspace. However, you will have to set "Use List Attribute Values" to the Conflict Resolution parameter, or set "Only Use List Attributes" to the Accumulation Mode parameter..
Your original workspace creates this table.
However, you need to create this one, I think.
If my understanding mentioned above is correct, just modify the parameter setting in the ListExploder like I suggested in my previous post.
Use the ListExploder like your original workspace. However, you will have to set "Use List Attribute Values" to the Conflict Resolution parameter, or set "Only Use List Attributes" to the Accumulation Mode parameter..
Use the ListExploder like your original workspace. However, you will have to set "Use List Attribute Values" to the Conflict Resolution parameter, or set "Only Use List Attributes" to the Accumulation Mode parameter..
I cannot understand what you want. The ListExploder and the ListConcatenator both didn't satisfy your requirement? Can you post a screenshot that illustrates your required result?
Use the ListExploder like your original workspace. However, you will have to set "Use List Attribute Values" to the Conflict Resolution parameter, or set "Only Use List Attributes" to the Accumulation Mode parameter..
if you want this one, expose the list elements {0} - {2}, then rename them with an AttributeManager.
Hi @danilo_inovacao. I thought I'd try your problem as well!
Using a ListBuilder before the FeatureMerger keeps the output features to 1 while retaining all three attributes from the XLS features. The attached workspace results in the following single line feature, where the values 2, 1, 0 represent your city names:
Perhaps this is the result you're looking for? Don't forget that the list attribute output can be manipulated in lots of ways. Check out this series of tutorials for a ton more information on lists in FME.
What I got from your image is that the destination feature should have a single line geometry and three pairs of id and name. If so, I would create a single attribute that stores XML or JSON document containing the three pairs of id and name. e.g.
Hi @danilo_inovacao, I'm afraid that no one can provide any specific solution unless you clarify how the destination feature should store the three pairs of id and name.
We have already suggested these different approaches so far.
List: _list{}.id, _list{}.name
Concatenated values: e.g. "ids"="1,2,3", "names"="vancouver,london,lima"
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.