Loading and Extracting Data with Tables

In the previous lessons of this Postgres course, we’ve been exploring PostgreSQL, and we have been mostly concerned with the different datatypes and their impact on performance when querying tables.

In this mission, you will evaluate the performance of loading data as well as extracting data to and from Postgres tables. Specifically, you will learn how to insert multiple values in a table at once as well as how to copy a Postgres table into a file. You will also learn more about the `cursor.execute` method and how it converts Python types into Postgres types.

While learning how to loading data with Postgres tables, you will continue to work on the IGN reviews dataset that contains reviews from games.

Knowing how to load and extract data tables with tables in Postgres is an important skill for anyone with an interest in data engineering, and as you learn you’ll be applying each new skill in our browser-based coding environment to ensure you can implement everything you’re learning.


  • Learn the process of loading data into Postgres tables
  • Learn how to extract Postgres data and clean it

Lesson Outline

  1. The Mogrify Method
  2. The Connection Encoding
  3. Inserting with Mogrify
  4. Postgres Copy Method
  5. The COPY statement
  6. Which method is faster?
  7. Extracting Table to CSV File
  8. Making a Copy of a Table
  9. Copy with Insert and Select
  10. Next steps
  11. Takeaways

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.