DBeaver Documentation

DOWNLOAD pdf

Data transfer

Data transfer is a crucial feature that enables you to export and import data in various formats as well as moving data between tables in the same or to different databases.

Note: The data transfer operation runs in the background, allowing you to continue working with your database during the export or import process. However, try to avoid changing data in the tables that have been selected for export or import until the process is complete.

Export data

You can transfer data from one database to another or export it in different types and formats:

  • CSV
  • XLSX (Excel spreadsheet)
  • HTML
  • XML
  • TXT
  • JSON
  • Markdown files
  • SQL statements
  • Source code arrays

The process of exporting data follows a similar procedure for the supported formats. Therefore, in this guide, we will focus on the data exporting process using the CSV format.

  1. Select the table or tables you want to export. In the context menu, choose Export Data.
    Note: you can also export data from custom SQL query results. To do that, choose Export data in the results context menu.

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

  3. Set your data extraction options (how the data will be read from the tables). This may affect the extraction's performance. And set the export format option. They are specific to the data format you chose in step 2:

    Setting name Description
    Maximum threads Number of threads used for data extraction.
    Extract type Defines the method of data extraction (Single query or Multiple queries).
    Segment size The size of data segments to be extracted at a time (active while Multiple queries are selected as an Extract type).
    Open new connection(s) Opens a new physical connection for data reading, recommended if you plan to continue working with the database during the export process.
    Select row count Queries row count before performing export to track progress, but may cause performance issues in some cases.
    Fetch size Number of rows the driver retrieves in one batch from the database.

    Tip: The Maximum threads option is active when exporting data from multiple tables. It is recommended to set the number of threads to match the number of cores in your computer for optimal performance.

  4. Configure the format settings.

    At this stage you configure the format settings for the output file. These settings determine how the data will be presented and encoded in the exported file.

    Setting name Description
    Formatting Selects the formatting settings for the exported data. Reed more in the related article
    Binaries Specifies how binary data is represented in the export.
    Encoding Sets the character encoding for the exported file.
    Value display format Chooses the format for displaying values in the export.
    Configure columns Allows you to set which columns to export. Configure the columns to export by clicking Configure. In the Action column, use the down arrow on a row to toggle between skip or export for that column/table.

    Note: The options within the Exporter settings section will vary and provide specific controls tailored to the format selected for export.

  5. Set options for output files or clipboards.

    Tip: You can export files to a remote file system via Cloud File Explorer using the Browser remote file system button . This feature is exclusively available to users of the Ultimate Edition, Team Edition, and CloudBeaver versions.

  6. Review what you want to format and which format you will export. You can also save all your settings as a task in this step or change the task variables:

  7. Press finish. See extraction progress. You can keep working with your database during the export process as the extraction will be performed in the background.

Import data

You can import data to your database from CSV, XLSX, and XML files.

Importing data from CSV file

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

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

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

    Tip: You can import files from a remote file system using the Cloud File Explorer by clicking the Browser remote file system button . This feature is exclusively available to users of the Ultimate Edition, Team Edition, and CloudBeaver versions.

  4. Set mappings. Please refer to our mapping process guide for more detailed information.

  5. Set options for loading data in the database. These options may affect the loading's performance:

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

  6. 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:

  7. 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:


Importing data from Excel file

1) Choose the database table (or tables) you want to import data into. Do this by right-clicking on the table name in the Database Navigator section and then clicking on Import Data.

2) In the window that appears, choose XLSX and click Next.

3) In the following window, choose the file that contains the data you wish to import into the table. Select the appropriate settings described below, then click Next.

Tip: You can import files from a remote file system using the Cloud File Explorer by clicking the Browser remote file system button . This feature is exclusively available to users of the Ultimate Edition, Team Edition, and CloudBeaver versions.

Setting name Description
Header position Determines the location of the column names in the Excel table, either at the top or none. This setting specifies whether the column names are located in the first row of the Excel table or if there are no column names present.
Skip empty rows If this setting is enabled, any open string values encountered during the data processing will be ignored and not inserted into the corresponding cells in the row. If the setting is disabled, all cells in the row will be filled with a NULL value if an empty string is encountered.
Import all sheets Specifies that all sheets in the file should be imported during the data import process.
Specific sheet name Enables you to choose a particular sheet from the Excel file for importing during the data transfer process.
Date/time format Use this setting to specify the date format used in the XLSX file. This is used to clarify the date format during the import process and does not affect the output data. You can refer to the java DateTimeFormatter documentation for details on the format pattern syntax.
Timezone ID The local machine timezone is used by default. There are three ways to specify the timezone:
1) Local zone offset: Specify the offset from UTC in the format of either a positive or negative number (e.g., +3, -04:30).
2) Specific zone offset: Specify the offset from GMT or UTC in the format of GMT+/-X or UTC+/-X (e.g., GMT+2, UTC+01:00).
3) Region-based: Specify the timezone using a region-based identifier such as UTC, ECT, PST, etc.
Sample rows count Determines the number of rows that will be used as a sample to estimate the length and data types of the imported data.
Minimum column length This value is used when creating a new column and, if necessary, specifying its type. It indicates the minimum number of characters or digits expected in the column. This information helps determine the appropriate data type and size for the column during the creation process.
Save task Opens the Save Task window to assist in creating a task during the data transfer process. This window provides options and settings for creating and configuring a task related to the data transfer operation.

5) In the next window, set XLSX-to-table mappings. Please refer to our mapping process guide for more detailed information.

6) Select your data load settings in the subsequent window, and then click Next. For more information, please refer to our article's section Data load settings article.

7) In the final window, you can review all the settings you selected earlier. If you missed something, you could go Back and fix it. When you are ready, finish the import by clicking Proceed.

8) If the XLSX file is valid and there are no errors, you will see a notification window with information about the completion of the task. You can keep working with your database during export, as the data loading will be performed in the background.

Additional features

When importing from Excel files, DBeaver provides additional features to enhance your data transfer experience:

  • Allow importing multiple sheets into different tables: DBeaver allows you to import multiple sheets from a single XLSX file into different tables in your database.

Importing data from XML file

1) Select the database table (or tables) where you want to import data. Do this by right-clicking on the table name in the Database Navigator section, then clicking on Import Data.

2) In the window that appears, select XML and then click Next.

3) In the following window, select the XML file that contains the data you want to import, then click Next.

Tip: You can import files from a remote file system using the Cloud File Explorer by clicking the Browser remote file system button . This feature is exclusively available to users of the Ultimate Edition, Team Edition, and CloudBeaver versions.

4) In the next window set XLSX-to-table mappings. Please refer to our guide for detailed information on the mapping process.

5) select your data load settings in the subsequent window, and then click Next. For more information, please refer to our article's section Data load settings.

6) In the final window, you can review all the settings you selected earlier. If you missed something, you can go back and adjust it. Once you are happy with everything, finish the import by clicking Proceed.

7) If the file is valid and there are no errors, you will see a notification window with information about the completion of the task. You can keep working with your database during export, as the data loading will be performed in the background.

Importing data from the database table

DBeaver offers seamless data migration capabilities, allowing you to transfer data from one database table to another. For more detailed instructions and insights on data migration, you can refer to our Data Migration guide.

Did we resolve your issue?