<div dir="ltr">Hi All,<br><div><br></div><div>I have several third-party living datasets (accessible via web services) that I need to replicate to an internal postgres instance (ETL processes).</div><div><br></div><div>My question is, given my script/model has obtained a copy of the dataset. What would you recommend I use to synchronize the new/freshly downloaded data with the older data in the postgres database? In other words, how do I sync/reconcile the database.</div><div><br></div><div>I have looked at the <a href="https://docs.qgis.org/3.22/en/docs/user_manual/processing_algs/qgis/database.html#export-to-postgresql">Export to postgres</a>, but this doesn't seem like the right approach. It can overwrite (i.e. drop, create) a table but this is not a suitable option. It does not document what it does if it finds a duplicate primary key/constraint either... (perhaps it does an upsert or maybe it just fails)?</div><div><br></div><div>Alternatively, there is a <a href="https://docs.qgis.org/3.22/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-sql">Postgres Execute SQL</a> algorithm, but that requires me to hand code all the sql statements in my script. Do-able, but not elegant.</div><div><br></div><div>Advice would be greatly appreciated.</div><div><br></div><div>Thanks for reading,</div><div>Andrew</div><div><br></div><div><br></div><div><br></div><div>isn't documented unfortunately does not offer this. All it does is drop/recreate the </div></div>