I have a shape file imported into Postgis database, and another sets of non-spatial data in Postgresql. I wish to join both of them on a common attribute Country_name.
Can someone please explain to me the steps to doing that in FME (screenshots if possible) ?
Thanks
Best answer by david_r
Here's a screenshot:
David
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.
there are several ways to do this in FME, but the easiest is probably to use a FeatureMerger.
Route the spatial data into the REQUESTOR port and the non-spatial data into the SUPPLIER port. In the properties of the FeatureMerger, set the join attribute (Country_name in your example) for both the requestor and the supplier.
The features exiting the MERGED port should be what you're after.
When creating a new table after inserting the writer feature type you can simply right click on the writer feature type and select copy from feature type.
Repeat that for both your input feature types. Mind you that in case of equal attribute names some kind of remanig and mapping will be necessary.
I have a question related with this topic, more from the final part:
- I have a spatial and non-spatial features from a Shapefile. Then, I need to return the same features (non-spatial and spatial) once modified using FME. But the problem is FME doesn`t write to SHP those non-spatial ones.