leo.blog();

DuckDB

DuckDB is a high-performance, in-process analytical database that lets you run SQL queries directly on your files.

DuckDB has some similarities with ClickHouse, especially with clickhouse-local.

Example snippets

Parquet to CSV

duckdb -cmd '.mode csv' -c "select * from './validation.parquet'" > validation.csv

Extensions

Python API

Segfault when importing

Sometimes when you import duckdb you get a segfault. If this happens, moving the duckdb import before your other imports can help.

Example

import duckdb

conn = duckdb.connect("test.duckdb")

Using with Ibis

You can use DuckDB with Ibis to perform DataFrame operations on your DuckDB tables and automatically generate SQL.

Leave a Comment