Question

Sequence increment field in PostGres

  • 7 September 2018
  • 5 replies
  • 16 views

Badge +6

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

Userlevel 2
Badge +17

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.

Userlevel 2
Badge +17

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.

Badge +6

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.

 

 

Badge +6
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

 

 

Badge

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.

Reply