Skip to content

DUX Sample v1

Choose a tag to compare

@wikar wikar released this 29 Jul 21:40

Sample data for DUX: 3,000,000 order lines of German beverage sales as a star schema, plus the semantic model and a demo dashboard built on it. Enough to go from an empty DuckLake instance to a working dashboard in one command.

Contents

*.parquet Sales (3,000,000 rows) joined by surrogate key to Customer, Date, Product, Region, Venue
dux.toml 23 formatted measures, 5 relationships, Date[Date] as the date table, 18 hidden columns
dashboards/sales/sales_test.json 19-element demo dashboard — 8 KPI cards, bar, line with a dual axis, table, map, 5 slicers, text, image
dashboards/assets/logo.png dashboard asset
install.ps1, install.sh installers
SHA256SUMS checksums of every file above
README.md, PROVENANCE.md, LICENSE docs, data lineage, redistribution terms

Compatibility

Built and verified against the DUX 0.12.x and 0.13.x lines — check yours with curl http://localhost:8080/version.

DUX Status
0.14.x Should work
0.13.x Verified
0.12.x Verified
0.11.x and earlier Not supported — the dashboard sets slicer.sort, which 0.12.0 introduced, and the slicer schema rejects unknown keys, so the restore fails with 422

DUX is pre-1.0, so a minor release may change the semantic-model or dashboard contracts. This table is updated as later versions are tested; when a break makes this bundle obsolete a new dux-sample-vN release supersedes it, and this one is marked accordingly.

Install

Requires a running duxd and an empty DuckLake instance — imports append, so installing over existing Customer, Date, Product, Region, Sales, or Venue tables gives you a duplicate copy of every row.

Extract anywhere — the bundle has no required location. Keep the folder intact, since the installer reads the Parquet files and dashboards/ from beside itself, and invoke it by any path; it resolves everything relative to the script, not to your working directory.

chmod +x install.sh && ./install.sh
./install.ps1

The chmod is needed because a zip carries no Unix permission bits; sh install.sh works without it.

Those zero-argument forms only work when the bundle is extracted into a DUX checkout at samples/dux-sample/ — that is the one layout where the defaults, which look two levels up for inbox/ and dashboards/, land on the real ones. Anywhere else, name the three paths.

The installer stages the Parquet files in the controlled import inbox and imports each one through POST /api/ducklake/imports, refreshes the schema, loads dux.toml through POST /import, copies the dashboard asset to disk, and restores the dashboard through PUT /api/dash/dashboards/{path}. Imports are idempotent per table, so a re-run after a partial failure resumes rather than duplicating rows.

POST /import replaces the whole semantic model. Existing relationships, measures, hidden columns, and date-table configuration are cleared. Back yours up with GET /export first if you need it.

Pointing it at any server

Three settings, each with a shell and a PowerShell form:

Setting install.sh install.ps1 Default
Server URL DUXD_URL -DuxdUrl http://localhost:8080
Import inbox (--import-dir) DUX_IMPORT_DIR -ImportDir inbox/ two levels up
Dashboards root (--dash-dir) DUX_DASH_DIR -DashDir dashboards/ two levels up

The inbox and dashboards root must be the ones duxd was started with, and the installer writes to both directly — assets are read-only over HTTP by design — so run it on the machine hosting duxd, or on a path that reaches the same directories.

A Docker deployment, for example. For a container started with:

docker run -d -p 9080:8080 \
  -v dux-db:/app/db \
  -v /vol/dux/inbox:/app/inbox \
  -v /vol/dux/dashboards:/app/dashboards \
  ghcr.io/wikar/dux:latest

run the installer on the host, against the host side of those bind mounts:

DUXD_URL=http://localhost:9080 \
DUX_IMPORT_DIR=/vol/dux/inbox \
DUX_DASH_DIR=/vol/dux/dashboards \
./install.sh

The container sees the same files at /app/inbox and /app/dashboards. Prefix with sudo env if those directories are root-owned, which they will be if the container created them. Nothing needs to be installed inside the container — the image ships no shell HTTP client.

Shape of the data

Calendar years 2023-2025. Net sales grow 4% in 2024 and 9% in 2025 year over year, Friday and Saturday carry the volume peak, and B2B is roughly three quarters of net sales and the only channel that discounts.

Sales value columns are prefixed with _ and hidden, so the model exposes measures rather than raw columns — including time intelligence (NetSalesYTD, NetSalesYoY%, NetSalesAmountR7D) against a 2000-2040 date table. Synthetic cost of goods sold yields blended margins from about 54% on water down to 35% on alcohol.

The dashboard opens filtered to 2025 so the year-over-year card reads a real figure on load.

Verify

dux-sample.zip SHA-256:

0b9a52af4e9fe376368d74584138e736d4d8982f76223748f7918f6baf2c4549

After extracting, verify the files against the shipped manifest:

cd dux-sample && sha256sum -c SHA256SUMS   # or: shasum -a 256 -c SHA256SUMS

Attribution

A DUX-enriched derivative of Beverage Sales by SWillm (sebastianwillmann), published under the MIT License. The original creator is not affiliated with or responsible for DUX or these enrichments. See LICENSE for redistribution terms and PROVENANCE.md for exactly what this bundle changes and adds on top of the source data.