Skip to main content

QuickStart

Running with Docker

  • Requirement
    • Docker

Quick start

  1. Download duckdb-tpch-example via the command line

    curl https://codeload.github.com/canner/wren-engine/tar.gz/main |\tar -xz --strip=2 wren-engine-main/example/duckdb-tpch-example
    duckdb-tpch-example

    ├── data
    │ ├── customer.parquet
    │ ├── lineitem.parquet
    │ ├── nation.parquet
    │ ├── orders.parquet
    │ └── part.parquet
    ├── etc
    │ ├── mdl
    │ │ └── tpch.json
    │ ├── accounts
    │ ├── config.properties
    │ ├── duckdb-init.sql
    │ └── duckdb-session.sql
    ├── .env
    ├── docker-compose.yaml
    └── README.md

    Or use this link and paste this URL then press Enter

    https://github.com/Canner/wren-engine/tree/main/example/duckdb-tpch-example
  2. Modify .env on your platform. (linux/amd64 or linux/arm64)(M1, M2, M3 is arm64)

    PLATFORM=linux/amd64
    ETC_PATH=./etc
  3. Run the docker-compose to start the engine service

    docker compose --env-file .env up
  4. Connect from PostgreSQL drivers using port 7432, example here we use psql

    psql 'host=localhost user=ina dbname=wren port=7432 options=--search_path=tpch'

    If psql: command not found or not install psql, you can install it via this website

  5. Query calculated fields

    wren=> SELECT orderkey_linenumber FROM Lineitem;

    orderkey_linenumber
    ---------------------
    11
    12
    13
    14
    15
    16
    21

    wren-engine-demo.gif

What’s Next?

  • Check out the Advanced Tutorial which takes a much deeper dive into the key concepts and capabilities of Wren Engine