Hi,

I was testing the UPSERT feature for combining geopackages. I have same tables 
in both gpkg databases and tables contain partly same, partly different 
features. There is a unique contraint in one attribute in addition to FID. FID 
cannot be used as a key for UPSERT because it is a counting number in both 
tables. Therefore I use -unsetfid as documented in 
https://gdal.org/en/stable/programs/ogr2ogr.html#cmdoption-ogr2ogr-upsert.

This request fails

ogr2ogr -upsert -unsetfid upserttest3.gpkg upserttest2.gpkg
ERROR 1: failed to execute insert : UNIQUE constraint failed: states.STATE_FIPS
ERROR 1: WriteArrowBatch() failed
ERROR 1: Terminating translation prematurely after failed
translation of layer states (use -skipfailures to skip errors)

But this one works

ogr2ogr -upsert -unsetfid upserttest3.gpkg upserttest2.gpkg --config 
OGR2OGR_USE_ARROW_API NO

I am not sure if I just should know to avoid the arrow api, of if this behavior 
could be a bug.

-Jukka Rahkonen-
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to