Skip to main content
Question

Sequence increment field in PostGres

  • September 7, 2018
  • 5 replies
  • 90 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

5 replies

takashi
Influencer
  • 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
Influencer
  • September 8, 2018
takashi wrote:

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
takashi wrote:

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
takashi wrote:
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

 

 


Forum|alt.badge.img
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings