Skip to main content

DuckDB

Connect to DuckDB

Prepare these materials

  • Prepare the data, such as parquet and CSV

  • Create a file name init.sql to import your data when Wren Engine starts.

    CREATE SCHEMA tpch;
    CREATE TABLE tpch.customer AS SELECT * FROM read_parquet('customer.parquet');
    CREATE TABLE tpch.orders AS SELECT * FROM read_parquet('orders.parquet');

Setup the config.properties

node.environment=production
wren.directory=<YOUR_MDL_FOLDER>
wren.datasource.type=duckdb
duckdb.connector.init-sql-path=init.sql
duckdb.connector.session-sql-path=<DUCKDB_SESSION_SQL_FILE_PATH_IF_YOU_NEED>

Properties detail DuckDB Connector