If you’re not familiar with importing data using DBeaver, then I encourage you to view my previous blog here.
When importing data, sometimes you receive data that isn’t in csv format. The delimiter is tabbed, barred or others. DBeaver’s csv driver can be customized to handle these delimiters and I will show you how.
Connecting to the delimited File
Right-click your database connection (or anywhere if your connections are empty), click Create and then click Connection.
Make sure the All tab is selected on the left and scroll down to CSV. Click Next.
Click Browse… and select the folder where your csv file is that you saved from Excel. You’re selecting a folder here, not a file.
At this point, to modify the settings, click Edit Driver Settings, then click the Connection properties tab in the lower half of the window.
Here you have several options:
charset – The character set of your data.
fileExtension – The extension of the file you’re trying to import.
quotechar – The character used in text fields to denote strings, if it exists.
separator – This is the delimiter used to separate columns.
suppressHeaders – False to include Headers, True to exclude Headers.
In my example I am using a file called delimted_data.txt, the delimited character is a vertical bar | and I will have headers in the file.
Change the Connection Properties to match below:
Once the properties are set, click OK and then click Finish.
At this point you can select the data from the file like you would any other imported data.
If you’re dealing with TAB delimited data, you can simply cut and paste a TAB from a text editor into the Connection Properties like below:
If you’re looking for other ways to import files into DBeaver, check out my other blogs:
PostgreSQL Updating Data Using CSV File with DBeaver