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) {
Connect your Iceberg clients (DuckDB, Spark, etc.) to:
http://localhost:{fmt.Sprintf("%d", data.IcebergPort)}/v1
Each S3 Table Bucket acts as an Iceberg catalog. Use the bucket name as the catalog prefix in your REST API calls.
| 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") } } | |
No catalogs availableCreate an S3 Table Bucket first to use as an Iceberg catalog. Create Table Bucket |
||||
{ `-- 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');` }
{ `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()` }