-
Notifications
You must be signed in to change notification settings - Fork 526
Database driver CSV
Note: This feature is available in Enterprise and AWS editions only.
This guide provides instructions on how to set up and use CSV files with CloudBeaver. The CSV Pro driver allows you to work with CSV data as if it were in a database. You can retrieve data and apply filters, sorting, and other operations, even combining data from multiple CSV files.
Important: When using the CSV Pro driver, all connected CSV files are read-only. To make changes, you need to update the original files outside CloudBeaver.
This section describes two ways to set up a connection: opening a file from Cloud Storage or creating a connection using the wizard.
Note: The connection from Cloud Storage is temporary and will be removed when the session ends.
You can open files directly from your Cloud Storage. Open Cloud Storage, find the file you need, and double-click it to create a connection. The connection will appear in the File databases folder in Database Navigator.
You'll need to be logged in using the Identity Provider associated with your Cloud Storage.
To create a connection in CloudBeaver, use the new connection wizard, select the CSV driver, and fill the following fields:

| Field | Description | Options |
|---|---|---|
| Configuration | Choose how to specify the connection details. | - Manual: Enter the database path manually. - URL: Provide a connection URL. |
| Database | Enter the file/folder path. | Use the appropriate format for your cloud provider. For instance: s3://AWS/files/path/example/
|
| Connection name | Enter a custom name for your connection. | Defaults to CSV Pro@localhost. |
| Project | Select the project where this connection belongs. | Default: Private. |
| Description | (Optional) Add details about this connection. | |
| Keep alive (in seconds) | Set how long the connection stays active. | Default: 0 (no timeout). |
| Auto commit | Enable automatic transaction commits. See more details on Auto and Manual commit modes. | Enabled by default. |
| Read-only connection | Restrict the connection to read-only mode. | Optional checkbox. |
For details on driver properties, see File-based driver properties.
Tip: When using the folder path in the Database field, CloudBeaver scans the directory up to two levels deep for supported files. If the folder contains multiple files, CloudBeaver organizes them into schemas based on their directory structure. For more information, see folder structure.
The CSV Pro driver supports the full range of SQL queries:
-
Simple queries (e.g.,
SELECT * FROM table): Data is read directly from the CSV file. -
Complex queries (e.g., using
WHERE,JOIN,ORDER BY,GROUP BY): When a complex query is executed for the first time, the driver imports the entire CSV file into an internal database to enable advanced SQL functions. Subsequent queries run faster because the data is already imported into internal database.
Note: If you want to join data from different files, they must be opened in the same connection. To do this, use a folder path instead of a single file when creating the connection.
CSV files don't include metadata about their structure, such as column names or data types. To enhance how CloudBeaver interprets these files, you can define a schema using a DDL (Data Definition Language) file.
A DDL file helps CloudBeaver interpret your data more accurately by defining:
- Column names
- Data types
- Optional indexes for better performance
- Create a
.ddlfile with the same name as your CSV file, placing it in the same directory (e.g.,employees.csvandemployees.csv.ddl). - Write a schema using the
CREATE TABLEstatement:
CREATE TABLE employees
(
id INTEGER,
name TEXT NOT NULL,
age INTEGER,
department TEXT
);
You can also use the WITH clause to set a data range - add firstRow and rowCount to your CREATE TABLE statement:
WITH (firstRow = 2, rowCount = 100)
-
firstRow- row number to start reading from (default: 1) -
rowCount- maximum number of rows to read
Tip: You can also set
firstRowandrowCountin the connection properties. DDL file settings take priority.
Important: If the DDL file contains errors, CloudBeaver will ignore it.
When working with a folder containing multiple CSV files, CloudBeaver organizes them as follows:
| Folder structure | Schema in CloudBeaver |
|---|---|
| Root files |
Default schema |
| Subfolder files | Schema named after the subfolder |
| Files in deeper folders | Ignored |
If your folder looks like this:
Data/
├── employees.csv
├── sales.csv
└── Reports/
└── monthly.csv
└── yearly.csv
CloudBeaver will create:
-
Defaultschema:employees,sales -
Reportsschema:monthly,yearly
Tip: To focus on specific files, consider selecting individual files or folders when configuring the connection.
When you execute a complex query (such as WHERE, JOIN, GROUP BY, or ORDER BY.), on an CSV file for the first
time, the CSV Pro driver processes the data by importing it into a temporary internal SQLite database.
This internal database stores data temporarily on the server during your session and is cleared when session ends.
CloudBeaver provides additional features compatible with CSV Pro driver, but not exclusive to it:
| Category | Feature |
|---|---|
| Data Export | Data Export |
| Data Visualization | Visual Query Builder |
| Charts |
For more details on driver properties, see File-based driver properties.
- Getting started
- Create connection
- Connection network options
- Supported databases
-
Drivers management
- Database authentication methods
- Database navigator
- Properties editor
- Data editor
- SQL editor
-
Entity relation diagrams
- Cloud services
-
AI Smart assistance
- Data transfer
- General user guide
- Administration
- Server configuration
-
Server security and access configuration
- Authentication methods
- Access management
- Proxy configuration
-
Secret management
- Logs
-
Query manager
- Workspace location
- Command line parameters
-
Session manager
- Deployment options
- CloudBeaver Editions
- FAQ
- Development