package app import ( "fmt" "net/url" "github.com/seaweedfs/seaweedfs/weed/admin/dash" "github.com/seaweedfs/seaweedfs/weed/s3api/s3tables" ) templ IcebergCatalog(data dash.IcebergCatalogData) {

Iceberg Catalog

Iceberg REST Catalog

Connect your Iceberg clients (DuckDB, Spark, etc.) to: http://localhost:{fmt.Sprintf("%d", data.IcebergPort)}/v1

Catalogs (Table Buckets)
{ fmt.Sprintf("%d", data.TotalCatalogs) }
REST Port
{ fmt.Sprintf("%d", data.IcebergPort) }
Last Updated
if data.LastUpdated.IsZero() { - } else { { data.LastUpdated.Format("2006-01-02 15:04") } }
Available Catalogs

Each S3 Table Bucket acts as an Iceberg catalog. Use the bucket name as the catalog prefix in your REST API calls.

for _, catalog := range data.Catalogs { } if len(data.Catalogs) == 0 { }
Catalog Name Owner REST Endpoint Created Actions
{ catalog.Name } { catalog.OwnerAccountID } /v1/{ catalog.Name }/namespaces if catalog.CreatedAt.IsZero() { - } else { { catalog.CreatedAt.Format("2006-01-02 15:04") } }
{{ bucketName, parseErr := s3tables.ParseBucketNameFromARN(catalog.ARN) }} if parseErr == nil { } else { }
No catalogs available

Create an S3 Table Bucket first to use as an Iceberg catalog.

Create Table Bucket
Example Usage
DuckDB
{ `-- Install and load Iceberg extension
INSTALL iceberg;
LOAD iceberg;

-- Create a catalog connection
CREATE SECRET (
    TYPE ICEBERG,
    ENDPOINT 'http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `',
    SCOPE 's3://my-table-bucket/'
);

-- Query tables
SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');` }
Python (PyIceberg)
{ `from pyiceberg.catalog import load_catalog

catalog = load_catalog(
    name="seaweedfs",
    **{
        "type": "rest",
        "uri": "http://localhost:` + fmt.Sprintf("%d", data.IcebergPort) + `",
    }
)

# List namespaces
namespaces = catalog.list_namespaces()` }
}