Solved

FeatureMerger - how to keep Requestor's fields?

  • 3 August 2016
  • 7 replies
  • 18 views

Badge

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!

icon

Best answer by erik_jan 3 August 2016, 22:54

View original

7 replies

Userlevel 2
Badge +12

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):

Badge

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?

Userlevel 2
Badge +12

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?

Userlevel 2
Badge +12

I have created an example with these settings:

With this result in the Data Inspector:

Badge

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.

Badge +9

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

Badge +7

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.

Reply