Skip to main content
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

 

Hi,

 

 

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.

 

 

David
Here's a screenshot:

 

 

 

 

David
thanks David.

 

One more thing, please how can I write the results from MERGED into postgis with attributes from both non spatial and spatial. ?
Hi,

 

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.

 

 

Hope this helps,

 

 

Itay
thanks Itay, but when I copied from feature type, it gives me the option to copy from one of the sources, not both sources
So copy first from one and then do it agai. For the second input, it's as simple as that 🙂
Hi all,

 

 

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.

 

Any suggestion?

 

 

Thanks!!

 

JuanM.

Reply