April 2019
Beginner to intermediate
244 pages
6h 34m
English
Upserts are a great option when you have a data loading process, like inserting the contents of CSV file, that you want to be safely repeatable. However, your data source must have at least one column with a unique index. Our genres table is ideal, as we have a unique index on the name column. But if your only unique column is the primary key, upserts may not be the right option—it would be unusual for the key to appear in a CSV file.
For more information on using upserts, see the docs for insert_all[27] and insert.[28]
Read now
Unlock full access