Skip to content

Importing

Base can import data from:

  • Files containing SQL statements
  • Delimited text files (like CSV)

To begin importing, open the database you would like to import into, then select File ▸ Import… from the menu bar.

SQL Files

To import a .sql file, you can select the file to be imported and optionally select an encoding for the file. Base will attempt to execute all SQL commands in the file in the order they appear.

Info

While SQL is a language standard, different database engines have different dialects.

If you have exported a .sql file from, say, MySQL or Microsoft SQL Server, they could easily have instructions that SQLite doesn't understand.

Base will try to run all commands in a given .sql file and makes no attempt to check whether they are compatible with SQLite. If they are not, the import will fail and show an error message.

You can read more about the SQLite dialect in the SQLite documentation.

Delimited text files

Import dialog
Import dialog showing the settings for importing a CSV file with column names into an existing table.

To import a delimited text file, you can select the file to be imported and optionally select an encoding for the file.

You can also specify the delimiter character used in the file to be imported and whether or not the file has column names in the first row. If you tick that the file does have column names, Base will try to use them as labels and will not import the first row.

Destinations

New table

Base will attempt to create a new table with a name you specify. If the first row of the file contains column names, Base will use these names. If not, it will number the columns.

Existing table

Select the table you would like to import into. You will then be able to choose which column from the imported file is inserted into each of the destination table columns. If the imported file contains column names, these will be shown. Otherwise, the columns will be numbered from left to right.