Updating the Data

Learn how to deal with data upon receiving an update.

After having loaded the data from May, let’s say that we’ve received an update for June. As usual, with updates of this kind, we don’t have a diff; rather, we have a whole new file with new content.

A batch update operation is typically implemented in this way:

  • Load the new version of the data from the file to a PostgreSQL table or a temporary table.

  • Use the update command ability to use join operations to update existing data with the new values.

  • Use the insert command ability to use join operations to insert new data from the batch into our target table.

Implementing batch update

Here’s how to write that in SQL in our case:

Get hands-on with 1400+ tech skills courses.