Skip to main content
Question

how to merge two data sets with different attributes

  • February 11, 2015
  • 2 replies
  • 24 views

Hi,

 

 

I have 2 shapefiles with two columns, one is an ID, the other is a description. I need to merge these two datasets into one shapefile whereby if a feature has the same ID but a different description these can get pulled out so I can change them. Sounds simple but for some reason I am really struggling.

 

 

Any advice would be very much appreciated,

 

 

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.

2 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 11, 2015
you could use 2 mergers in  a row.

 

1st merges on ID and the second featuremerger uses suplier as wel as requesteroutput from the first featuremeger and merges on ID and Description. Non merged outputs are your target.

 

(or 1st merge on both attributes and the "Not Merged" output to second merger both inputs and merge on ID. Now they Merged ones are the target.)

 

 

 

 

takashi
Celebrity
  • February 13, 2015
Hi,

 

 

As Gio suggested, you can use the FeatureMerger to do that.

 

There could also be some other ways. e.g. the InlineQuerier. 

 

 

SQL Query Example:

 

-----

 

select a.*, b.Description as Description2

 

from Shape1 as a inner join Shape2 as b

 

on b.ID = a.ID and b.Description <> a.Description

 

-----

 

 

Takashi