Bulk insert / update / upsert in SQLAlchemy
August 10, 2024
Upsert (dialects):
- https://docs.sqlalchemy.org/en/20/orm/queryguide/dml.html#orm-queryguide-upsert
- SQLAlchemy does not yet have a backend-agnostic upsert construct
Upsert (dialects):
- sqlite - https://docs.sqlalchemy.org/en/20/dialects/sqlite.html#sqlite-on-conflict-insert
- postgres - https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#postgresql-insert-on-conflict
- mysql - https://docs.sqlalchemy.org/en/20/dialects/mysql.html#mysql-insert-on-duplicate-key-update
Update:
Insert:
- performance profiling