I've got a vector layer Target. I want to periodically add features that arrive (with the same attributes) in new.csv, which was created in the field.
I'd like to append them to Target if and only if they're not already there. I don't want to duplicate existing features, and I want to keep any tweaks done in Target, i.e. I don't want to replace existing features from new.csv either. (The features have a unique and consistent ID in a Name field.)
What's the simplest way to do this, in a way that can easily be (semi)automated to run weekly? I can think of the following, but seeking advice before I reinvent the wheel:
Use the
mergeprocessing algorithm and then postprocess to delete duplicates, makingnew.csvhave a flag in a each feature's comment field to know which duplicate to nuke.Dust off my rusty SQL and run some sort of
APPENDquery in DB Manager, with anEXCEPTclause to skip what's already inTarget?Write a PyQGIS script to traverse the features in
new.csv, throw out those whereNameis already inTarget, and then uselayer.dataProvider().addFeatures(featureList)to add what's left toTarget.
Suggestions? I don't think it matters, but the feature geometry are points in EPSG:4326. Target is one of several layers in a gpkg, and new.csv is of course a separate comma separated file, which can be imported as a layer with point geometry.

