Loading tutorials
INSERT, UPDATE, SELECT), primary keys, and table constraints. It also assumes you have read the earlier chapters on external IDs and on keeping your own primary key next to them. The examples use PostgreSQL.2 min readINSERT, UPDATE, SELECT, primary keys) and that you have a table with a unique constraint on the external ID. The examples use PostgreSQL. SQLite supports the same ON CONFLICT syntax.2 min readcustomers table and the ON CONFLICT upsert from the previous chapters.3 min readcustomers table from the earlier chapters, with UNIQUE (source_system, external_id). It also assumes you can read a basic INSERT ... ON CONFLICT DO UPDATE statement. The question here is what the SET list should contain.2 min readINSERT ... ON CONFLICT upsert and know that the external ID column has a unique constraint. Both come from earlier chapters.2 min readINSERT ... ON CONFLICT statement and that customers has a unique constraint on (source_system, external_id). Here you will apply that statement to many records at once.2 min readINSERT ... ON CONFLICT DO UPDATE keyed on (source_system, external_id), and that you have read the earlier chapters on the unique constraint and on normalizing external IDs.2 min readINSERT ... ON CONFLICT DO UPDATE keyed on an external ID, and that your source system gives each record a last-modified timestamp. It builds on the upsert statement from earlier chapters.2 min readINSERT ... ON CONFLICT statement from earlier chapters. It also assumes the customers table has a unique constraint on (source_system, external_id). Here you will see what goes wrong when two writers load the same record at the same time, and why the cons3 min readINSERT ... ON CONFLICT DO UPDATE statement. It also assumes your table has a unique constraint on the external ID, and that you normalize IDs and deduplicate batches before loading. Here you check that these pieces work together.2 min read