I attempting to write to an existing table which contains polygons based in Postgres database. I have selected truncate existing table.
I get following error:
Error was 'ERROR: null value in column "objectid" violates not-null constraint
The object ID seems to be an issue only when attempting remove existing data and add new data. When creating a new table, this is not a issue.
Best answer by tomf
It sounds like the Postgresql table has a non-null constraint on the objectid field (There's no ESRI SDE sitting on top of this DB is there?). You will have to ensure that all features you write contain a value for objectid (or edit the table definition to remove the constraint). Also, check your writer feature type parameters don't assign an index to objectid.
Creating a new table won't automatically have this constraint, so you don't run into this issue.
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.
It sounds like the Postgresql table has a non-null constraint on the objectid field (There's no ESRI SDE sitting on top of this DB is there?). You will have to ensure that all features you write contain a value for objectid (or edit the table definition to remove the constraint). Also, check your writer feature type parameters don't assign an index to objectid.
Creating a new table won't automatically have this constraint, so you don't run into this issue.