Problems importing to Postgresql using auto-generated id

  • 259Views
  • Last Post 19 February 2019
Elena O'Neil posted this 18 February 2019


I would like to import new rows into a Postgresql table where the primary key uses uuid_generate_v4() to generate unique Id's. The problem is that Skyvia requires me to map that Id field, even though it will auto-populate on insert. Is it possible to leave the target id unmapped to allow for the database to create the id? Any help would be much appreciated. Thanks in advance. 

Mariia Zaharova posted this 19 February 2019

Hi Elena!

In case if you are using UPSERT operation in your package then ID mapping is required. The UPSERT operation updates a record if it exists or inserts a new record. This allows you to avoid inserting duplicate data. In Skyvia, UPSERT determines what action to perform in the following way: if a Null value is specified for the ID or primary key, UPSERT operation inserts the record, and if a non-null value is specified, UPSERT operation tries to update the record with the specified ID or primary key. Please refer to:


If you are using INSERT operation, then please send us DDL script of your target PostgreSQL table.

Thank you and looking forward to your reply.


Best regards,