Skip to main content
Question

Sequence increment field in PostGres

  • September 7, 2018
  • 5 replies
  • 124 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

Hi,

In my Postgres database there is one field created directly in database called 'code'.

This field is auto increment.

How I inform to FME that this field exist and none value can be recorded by FME.

I tried record my data without this filed in FME but the ERROR was showed for me.

thank´s

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

takashi
Celebrity
  • September 8, 2018

The PostgreSQL writer should be able to insert records which don't have the 'code' attribute (serial type = auto increment field) into the existing table.

Could you please post the logged error messages? Logged messages are important to know what happened, and also there could be a hint for resolving the issue.


takashi
Celebrity
  • September 8, 2018

The PostgreSQL writer should be able to insert records which don't have the 'code' attribute (serial type = auto increment field) into the existing table.

Could you please post the logged error messages? Logged messages are important to know what happened, and also there could be a hint for resolving the issue.

You can import the schema from the existing table to generate a writer feature type, when adding the writer.

 

Then, the writer feature type containing a serial type field (named 'code' in this example) looks like this.


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • September 8, 2018

The PostgreSQL writer should be able to insert records which don't have the 'code' attribute (serial type = auto increment field) into the existing table.

Could you please post the logged error messages? Logged messages are important to know what happened, and also there could be a hint for resolving the issue.

Unfortunately there is no message error. Only the auto increment filed show duplicated.

 

 


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • September 8, 2018
You can import the schema from the existing table to generate a writer feature type, when adding the writer.

 

Then, the writer feature type containing a serial type field (named 'code' in this example) looks like this.

I think that your answer help me completly. Thank´s

 

 


cww7
Contributor
Forum|alt.badge.img+3
  • Contributor
  • July 23, 2019

Is the name of your sequence defined in the following way: [table_name] _ [field] _seq? If so, FME will automatically recognize the serial type and you will be able to remove the column for Postgresql to fill it automatically.