> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-worktree-statusbar-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DuckDB

> Connect to DuckDB databases with TablePro

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

The DuckDB driver plugin (1.0.19) bundles DuckDB 1.5.2, with DuckLake 1.0 support.

## Connecting to a DuckDB database

<Steps>
  <Step title="Create a new connection">
    Open TablePro and click **New Connection** or press <kbd>⌘N</kbd>.
  </Step>

  <Step title="Select DuckDB">
    Choose **DuckDB** from the database type list.
  </Step>

  <Step title="Choose your database file">
    Click **Browse** to select an existing `.duckdb` file, or enter the path to create a new database.
  </Step>

  <Step title="Connect">
    Click **Connect** to open the database.
  </Step>
</Steps>

## Connection URL

```text theme={null}
duckdb:///path/to/database.duckdb
```

See [Connection URL Reference](/databases/connection-urls) for all parameters.

## Opening DuckDB files from Finder

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

## DuckDB on iOS

The iOS app supports DuckDB too. In the connection form, pick DuckDB and either turn on **In-Memory Database** or open a `.duckdb`/`.ddb` file through the Files app. Opened files keep working across launches through a security-scoped bookmark, so edits write back to the original file.

The iOS build links the `core_functions`, `json`, `parquet`, and `icu` extensions. Runtime extension autoloading is off, so extensions that download on demand (such as `httpfs`) are not available on iOS. Large in-memory databases are bounded by the app's memory budget.

## Querying files directly

DuckDB can query CSV, Parquet, and JSON files directly with SQL:

```sql theme={null}
-- 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.

```sql theme={null}
-- 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:

```sql theme={null}
-- 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:

| Category  | Types                                                        |
| --------- | ------------------------------------------------------------ |
| Numeric   | `INTEGER`, `BIGINT`, `HUGEINT`, `DOUBLE`, `FLOAT`, `DECIMAL` |
| String    | `VARCHAR`, `TEXT`, `CHAR`                                    |
| Date/Time | `DATE`, `TIME`, `TIMESTAMP`, `INTERVAL`                      |
| Complex   | `LIST`, `MAP`, `STRUCT`, `UNION`, `ENUM`, `VARIANT`          |
| Other     | `BOOLEAN`, `BLOB`, `UUID`, `JSON`, `BIT`                     |

## Limitations

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