Connect to MinIO Object Store#

Log-In with OSM Account#

minio_login

Create Access Key#

  • Create a new access key.

minio_login

  • Copy both keys, you’ll need them in the next step.

minio_login

Connect to MinIO via DuckDB#

!pip install duckdb==1.0.0
import duckdb
con = duckdb.connect()

Adjust the code below and add your access keys in there:

import os
s3_user = os.environ["S3_ACCESS_KEY_ID"]  # s3_user = 'my_user_access_key'
s3_password = os.environ["S3_SECRET_ACCESS_KEY"]  # s3_password = 'my_user_secret_key'

Create DuckDB connection to MinIO.

query = f"""
DROP SECRET IF EXISTS "__default_s3";
CREATE SECRET (
      TYPE S3,
      KEY_ID '{s3_user}',
      SECRET '{s3_password}',
      REGION 'eu-central-1',
      endpoint 'sotm2024.minio.heigit.org',
      use_ssl true,
      url_style 'path'
  );
"""
con.sql(query).show()
┌─────────┐
│ Success │
│ boolean │
├─────────┤
│ true    │
└─────────┘

Now you are ready to explore Apache Iceberg Catalog and Iceberg tables in the next step.