Skip to content

CLI

One binary. mink runs a node, administers a cluster, reads and writes tables and benchmarks them. Data goes to stdout, logs and status to stderr, so output pipes cleanly.

Connecting

FlagEnvironmentDefault
-b, --bootstrapMINK_BOOTSTRAPgrpc://127.0.0.1:9123, comma separated for several nodes
--jsonOff. Prints the protocol messages as JSON instead of formatted text

Any node answers metadata and admin commands. Reads and writes follow redirects to the bucket leader. Logging is RUST_LOG, default info.

Databases and tables

CommandPurpose
db listDatabase names
db create <db> [--comment] [--property k=v] [--if-not-exists]Create
db drop <db> [--if-exists] [--cascade]Drop, --cascade drops its tables
table list <db>Table names
table describe <db.table>Descriptor, schemas, bucket leaders
table create <db.table> ...Create, flags below
table alter <db.table> [--add-column "name TYPE"] [--set k=v] [--reset k]Add columns and change options, all or nothing
table drop <db.table> [--if-exists]Drop
partition list <db.table>Partitions
partition create <db.table> k=v ...One k=v per partition key
partition drop <db.table> k=v ...Drop a partition and its buckets

table create flags:

FlagValue
-C, --columnname TYPE [NOT NULL], in order, repeatable
--primary-keyk or k,region. Makes it a primary-key table
--partition-byPartition key columns
--bucket-keyColumns rows are hashed by. Primary key minus partition keys when omitted
--bucket-countBuckets per partition. The cluster default_bucket_count when omitted
--log-formatarrow
--kv-formatcompacted or indexed, primary-key tables
--merge-enginefirst_row, aggregation or versioned:<column>
--changelog-imagefull or wal
--log-ttl7d, 12h or forever
--lakeiceberg
--lake-freshnessHow far the lake may lag, 3m
--lake-auto-compactionLet the tiering worker rewrite small files
--lake-attachAttach to an existing lake table instead of creating one
--propertyFree-form k=v, repeatable
--descriptor <file>A whole descriptor as JSON, what describe --json prints. Excludes every other flag
--comment, --if-not-exists

Options and their defaults are in Tables.

Offsets and snapshots

CommandPurpose
table offsets <db.table> [--bucket n] [--partition p] [--at earliest|latest|<ts>]Log offsets per bucket. --at takes a millisecond or RFC 3339 timestamp and resolves it to an offset
table lake-snapshot <db.table>The Iceberg snapshot id and the offset each bucket was tiered to
table kv-snapshot <db.table> --bucket n [--partition p]Newest completed KV snapshot of a primary-key bucket
producer-offsets get <id>A sink's registered start offsets
producer-offsets delete <id>Forget them

Read and write

bash
mink write shop.orders < rows.jsonl
mink read shop.orders --mode snapshot
mink read shop.events --from latest -f
Flagreadwrite
--bucket n, --partition pOne bucket or partition, all when omitted
--mode log|snapshot|unionlog is the log or changelog, snapshot the current rows of a primary-key table, union lake history then log tail
--from earliest|latest|<offset>Log start position
-f, --followKeep reading as rows arrive, log mode
-n, --limitStop after this many rows
--metaAdd __bucket, __offset and __change to each row, log mode
--deleteDelete the keys in the rows instead of upserting
--columns a,bPartial update. Only these columns are in the input, must include the primary key
--batch-rows nRows per request, 1024

Input and output are JSON lines. Partitions are created on first write.

Admin

CommandPrints
cluster describeCoordinator, counts of databases, tables, partitions and buckets, and every node with address, liveness, buckets led, epoch and protocols
cluster health [--node addr]A node's id, epoch, registration, coordinator flag, hosted buckets and uptime. Exit 1 when the node is not registered
cluster config [--node addr]A node's effective configuration, secrets redacted
cluster stats [--node addr | --all]Hosted buckets with epoch, offsets, writers, KV rows and snapshot offsets. On the coordinator, the tiering schedule
cluster rebalanceMoves bucket leadership from nodes above 110% of the mean load to nodes below 90%, and prints the moves

--node defaults to the bootstrap node. health is the liveness probe the compose stacks use.

Bench

bash
mink bench shop.load --create 8 --mode upsert --key-space 100000 --duration 30s
FlagDefaultPurpose
--mode append|upsertappendLog appends or primary-key upserts
--rows100000Rows in total
--batch1000Rows per write
--concurrency4Concurrent writers
--payload64Bytes per row
--key-space0Upsert: ids wrap modulo this so later writes update earlier rows
--start0First id
--durationStop after this long even if rows remain
--create <buckets>Create the table first with the bench schema
--lakeWith --create, tier the table
--leader-wait60sHow long a write retries while a bucket has no leader
--pause-ms0Sleep between writes per writer

The report has rows and bytes per second, acknowledged rows and batches, errors, stalls and latency percentiles. It uses the same client path as write, so redirects and leader waits are in the numbers.

mink-query

mink-query is a second binary from query/mink-query-cli.

CommandPurpose
serve [--listen 0.0.0.0:9130]Flight SQL
exec -e <sql>, exec -f <file>, exec < stdinRun statements, --format table|json|csv
shellInteractive
FlagEnvironmentDefault
-b, --bootstrapMINK_BOOTSTRAPgrpc://127.0.0.1:9123
-c, --configMINK_QUERY_CONFIGNone. TOML with [lake] and engine settings
-d, --databaseMINK_QUERY_DATABASEdefault

Planning, pushdown and the engine settings are in SQL.

Serve

mink serve runs a node. Its flags, the MINK_* environment and the TOML file are in Configuration, deployment layouts in Docker.