Skip to main content

DuckDB

DuckDB is an embedded analytical database, optimized for OLAP workloads. TablePro supports connecting to DuckDB database files for browsing tables, running queries, and managing schemas.

Connecting to a DuckDB database

1

Create a new connection

Open TablePro and click New Connection or press ⌘N.
2

Select DuckDB

Choose DuckDB from the database type list.
3

Choose your database file

Click Browse to select an existing .duckdb file, or enter the path to create a new database.
4

Connect

Click Connect to open the database.

Opening DuckDB files from Finder

Double-click any .duckdb file in Finder to open it directly in TablePro.

Querying files directly

DuckDB can query CSV, Parquet, and JSON files directly with SQL:
-- Query a CSV file
SELECT * FROM 'data.csv';

-- Query a Parquet file
SELECT * FROM read_parquet('analytics.parquet');

-- Query a JSON file
SELECT * FROM read_json('config.json');

Schema support

DuckDB supports multiple schemas within a single database. The default schema is main. Use the schema switcher in the toolbar to navigate between schemas.
-- Create a new schema
CREATE SCHEMA analytics;

-- Create a table in a specific schema
CREATE TABLE analytics.events (
    id INTEGER PRIMARY KEY,
    event_name VARCHAR,
    created_at TIMESTAMP
);

DuckDB extensions

DuckDB has a rich extension ecosystem. Install and load extensions using SQL:
-- Install an extension
INSTALL httpfs;

-- Load an extension
LOAD httpfs;

-- Query remote Parquet files
SELECT * FROM read_parquet('https://example.com/data.parquet');

Data types

DuckDB supports a wide range of data types:
CategoryTypes
NumericINTEGER, BIGINT, HUGEINT, DOUBLE, FLOAT, DECIMAL
StringVARCHAR, TEXT, CHAR
Date/TimeDATE, TIME, TIMESTAMP, INTERVAL
ComplexLIST, MAP, STRUCT, UNION, ENUM
OtherBOOLEAN, BLOB, UUID, JSON, BIT

Limitations

DuckDB is embedded (no network access) and allows only one writer at a time.