Skip to main content
Solved

FeatureMerger - how to keep Requestor's fields?


Forum|alt.badge.img

I used FeatureMerger to join two tables, but I didn't see any fields other than the KEY field were kept in the Mergered or Referenced ports. Is there a way to keep all Requestor's fields when using FeatrueMerger? Please help!

Best answer by erik_jan

The FeatureMerger has a number of settings that define what to do with attributes.

First you want to define if you want to merge geometry, attributes or both.

In the next section you define how to resolve attribute conflicts.

See image (FME 2015 and 2016):

View original
Did this help you find an answer to your question?

7 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • Best Answer
  • August 3, 2016

The FeatureMerger has a number of settings that define what to do with attributes.

First you want to define if you want to merge geometry, attributes or both.

In the next section you define how to resolve attribute conflicts.

See image (FME 2015 and 2016):


Forum|alt.badge.img
  • Author
  • August 3, 2016
erik_jan wrote:

The FeatureMerger has a number of settings that define what to do with attributes.

First you want to define if you want to merge geometry, attributes or both.

In the next section you define how to resolve attribute conflicts.

See image (FME 2015 and 2016):

the above setting doesn't keep fields from Requestors for Referenced port. Can you please tell me how to keep the Requestor's attributes?


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • August 3, 2016
fmenewbie wrote:

the above setting doesn't keep fields from Requestors for Referenced port. Can you please tell me how to keep the Requestor's attributes?

These settings should keep the requestors attributes and add only new attributes from the supplier. Are you sure no other transformer is removing the attributes from the requestor before the feature reaches the FeatureMerger? Can you share the workspace?


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • August 3, 2016

I have created an example with these settings:

With this result in the Data Inspector:


Forum|alt.badge.img
  • Author
  • August 4, 2016
erik_jan wrote:

I have created an example with these settings:

With this result in the Data Inspector:

The Merged port keeps only 1 matched supplier from the requestor. But i want to keep all matched suppliers based on 1 single requestor. The Referenced port can keep all matched suppliers but didn't keep the requestor's attributes.


ciarab
Contributor
Forum|alt.badge.img+9
  • Contributor
  • August 4, 2016

Have you set process duplicate suppliers to yes? I think that's what you are looking for by the sounds of it


tino
Contributor
Forum|alt.badge.img+17
  • Contributor
  • August 4, 2016

I don't think there is a way to get the requestor's attribute to the referenced suppliers on the "Referenced" output port.

Your use case sounds as if you want to switch the input ports: Use the one requestor object as supplier and your supplier as requestor objects. Then the "Merged" output should give you the required result.

PS:

I think you can also leave it as it is, activate "Generate list", filter the feature in question after the "Merged" port, then use the ListExploder transformer. This gives you every supplier attribute-wise, only the (if existing) supplier geometry is lost. If this is crucial go with the change input port variant.


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