Skip to content

Engines ​

Any engine with an Iceberg REST catalog connects to Mink with two addresses: the catalog and the S3 endpoint. No plugin and no client library. The console's Connect page fills in the snippets below for a running cluster.

EngineVersionCatalog
DuckDB1.4 or laterATTACH ... (TYPE iceberg)
PyIceberg0.12RestCatalog
Spark4.1, with Iceberg 1.12SparkCatalog of type rest
Trino484iceberg connector, catalog type rest
EMR Serverless7.14.0, with Spark 3.5.8 and Iceberg 1.10.1SparkCatalog of type rest, see AWS

Mink's S3 endpoint accepts any access key and secret. Most S3 clients require one, so the snippets set both to mink.

The addresses below are a node's defaults. Set catalog_endpoint and s3_endpoint to the addresses engines reach.

DuckDB ​

sql
INSTALL iceberg; LOAD iceberg;
INSTALL httpfs; LOAD httpfs;

CREATE SECRET mink (TYPE S3, KEY_ID 'mink', SECRET 'mink', REGION 'us-east-1',
  ENDPOINT '127.0.0.1:9100', URL_STYLE 'path', USE_SSL false);
ATTACH 'warehouse' AS mink (TYPE iceberg, ENDPOINT 'http://127.0.0.1:8181', AUTHORIZATION_TYPE 'none');

SELECT count(*) FROM mink.kafka."orders";

PyIceberg ​

python
from pyiceberg.catalog.rest import RestCatalog

catalog = RestCatalog('mink', uri='http://127.0.0.1:8181',
                      **{'s3.access-key-id': 'mink', 's3.secret-access-key': 'mink'})
table = catalog.load_table('kafka.orders')
print(table.scan().to_arrow().num_rows)

Spark ​

bash
spark-sql \
  --packages org.apache.iceberg:iceberg-spark-runtime-4.1_2.13:1.12.0,org.apache.iceberg:iceberg-aws-bundle:1.12.0 \
  --conf spark.sql.catalog.mink=org.apache.iceberg.spark.SparkCatalog \
  --conf spark.sql.catalog.mink.type=rest \
  --conf spark.sql.catalog.mink.uri=http://127.0.0.1:8181 \
  --conf spark.sql.catalog.mink.io-impl=org.apache.iceberg.aws.s3.S3FileIO \
  --conf spark.sql.catalog.mink.s3.endpoint=http://127.0.0.1:9100 \
  --conf spark.sql.catalog.mink.s3.path-style-access=true \
  --conf spark.sql.catalog.mink.s3.access-key-id=mink \
  --conf spark.sql.catalog.mink.s3.secret-access-key=mink \
  -e 'SELECT count(*) FROM mink.kafka.`orders`'

The same settings work for a Spark Connect session, set with spark.conf.set before the first query.

Trino ​

etc/catalog/mink.properties:

properties
connector.name=iceberg
iceberg.catalog.type=rest
iceberg.rest-catalog.uri=http://127.0.0.1:8181
fs.native-s3.enabled=true
s3.endpoint=http://127.0.0.1:9100
s3.path-style-access=true
s3.region=us-east-1
s3.aws-access-key=mink
s3.aws-secret-key=mink
sql
SELECT count(*) FROM mink.kafka."orders";

Table names ​

A table has its topic's name. Names with - or . need quoting.

EngineQuoted
DuckDB, Trinomink.kafka."demo-events"
Sparkmink.kafka.`demo-events`
PyIcebergcatalog.load_table('kafka.demo-events')