PostgreSQL Tutorial: Import Data using DBeaver

October 25, 2023

Summary: in this tutorial, you will learn how to import data from files to PostgreSQL tables using DBeaver.

  1. Select one or more tables to which you want to import data. In the context menu, choose Import Data:

img

  1. In the window that appears, choose CSV and click Next.

img

  1. Select the input CSV file for each table you want to import. You can change the Importer settings (format specific) during this step:

img

  1. Set CSV-to-table mappings. You must set a column in the CSV file for each database table column. You can skip columns (the value will be set to NULL in the target table column). You can set constant values for the table column if there is no source column in the CSV.

img

  1. Set options for loading data in the database. These options may affect the loading’s performance:

img

Read our tutorial on Data Import and Replace to learn more about the replacing method option.

  1. Review which file(s) and to which table(s) you will import. You can also save all your settings as a task in this step:

img

  1. Press finish. See extraction progress. You can keep working with your database during the export process as the data loading will be performed in the background. In the end, you will see the following status message:

img

comments powered by Disqus