Skip to main content
Solved

Writing to specific schema in PostGIS database

  • Nov 14, 2012 8:28 AM UTC
  • 5 replies
  • 480 views

Forum|alt.badge.img
Morning all,

 

 

I am loading a set of shapefiles into a PostGIS database using a shapefile reader and a PostGIS writer. If I accept the default workbench created by FME the data gets written to the public schema.  Where/how can I set the schema in the writer that I actually want the data written to?  Probably a simple solution...

 

 

FME Desktop 2012 sp3 and PostgreSQL 9.1 with PostGIS 2.0

 

 

Thanks

Best answer by brendan

I can't check at the moment, but I believe in the PostGIS writer properties you set the "Database Username" to the PostGIS schema name.

 

View original
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.

5 replies

Forum|alt.badge.img
  • Best Answer
  • Nov 14, 2012 9:40 AM UTC
I can't check at the moment, but I believe in the PostGIS writer properties you set the "Database Username" to the PostGIS schema name.

 


  • Nov 14, 2012 10:00 AM UTC
The answer to your question can be found in the link below;

 

http://fmepedia.safe.com/articles/Error_Unexpected_Behavior/In-the-Postgis-Postgres-reader-tables-from-a-different-schema-don-t-show-up

 

 

I have used it before and it worked.

Forum|alt.badge.img
  • Author
  • Nov 14, 2012 10:27 AM UTC
Thanks Brendan, that was it - database username should be the database schema you want to write to.

Forum|alt.badge.img
  • Dec 17, 2015 11:52 AM UTC

Hi,

Supplementing this answer with FME 2015 guidelines:

To write data in a different schema within a PostgreSQL or PostGIS database you need to type the schema name within the the PostgreSQL or the PostGIS database writer under the "General" tab and within the "Table Qualifier" form.


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • Oct 9, 2018 1:47 PM UTC

Just had this question myself and this is how I fixed this: just add the schema<dot> in front of your table name, which can be parameterized or filled with attribute value.

schema.mytable