Skip to main content
Solved

How to join multiple shp files with common field?

  • November 2, 2017
  • 1 reply
  • 15 views

Forum|alt.badge.img

Hello,

I have 3 shp files which I need to join

File 1

Postal code and name

File 2

Admin code and name

File 3

Admin code and state

Name in File 1 and File 2 has identical list

Admin code in File 3 is first two digits of Admin code in File 2

I need to create single file which would have the Postal Code, Name and State.

I tried to create Reader for File 1 and a Reader for File 2 and write them into the same file. The transaction was successful, however it first listed all items from File 1 and below all items from File 2.

Best answer by jdh

You need to use a FeatureMerger to join two streams of data together.

Use a substringextractor on the admin code in file 2, so that you have the same value as File 3.

One FeatureMerger with File 1 as requestor and File 2 as supplier, on name.

The merged output of that goes into a second featureMerger with File 3 as the supplier on Admin Code (truncated)

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.

1 reply

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • Best Answer
  • November 2, 2017

You need to use a FeatureMerger to join two streams of data together.

Use a substringextractor on the admin code in file 2, so that you have the same value as File 3.

One FeatureMerger with File 1 as requestor and File 2 as supplier, on name.

The merged output of that goes into a second featureMerger with File 3 as the supplier on Admin Code (truncated)