Question

How do I perform fme_db_operation on GeoPackage using an UUID (no integer)


Hey guys,

 

is it possible to perform an INSERT/UPDATE/DELETE operation (fme_db_operation) on GeoPackage using an UUID which isn't an integer?

The UUID was created by UUIDGenerator.

 

If I execute the following workspace, I'll get this error message:

e.g.

OGCGEOPACKAGE writer: Cannot perform Delete on feature type 'original' by matching attribute 'UUID' since value '{48fb8445-ca8d-4f74-94ed-b0ce6c89ffdc}' is not an integer. Skipping feature.

 

Workspace:

workspaceWriter-Settings (unfortunately in german language)

geopackage_writer_settings 

Thank you very much!


2 replies

Badge +4

Have you tried using the id (PrimaryKey) which is an int? https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/ogcgeopackage/user-attributes.htmimage

Badge +2

@momo​ @Reed Whittington​ is correct you have to use the PrimaryKey. In older versions of FME this had to be "id" or Geopackage_fid. However in FME 2021.1 and above it can be any integer value that has been set as the PrimaryKey. If you source update data only has a UUID (like an Esri file geodatabase) then you will have to read back the original OGC GeoPackage, join that to the update data using the UUID to get the original PrimaryKey and then use that PrimaryKey for the updates. Something similar (but not exactly the same) as the attached workspace (FME 2022.1). When you merge back the the original data with, say, FeatureJoiner, make sure your original attributes do not clobber the update attributes - using AttributeKeeper should ensure this does not happen.

Reply