Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 1.94 KB

File metadata and controls

56 lines (47 loc) · 1.94 KB

Apache Iceberg S3Tables Catalog (Rust)

crates.io docs.rs

Official Native Rust implementation of the Apache Iceberg S3Tables catalog.

Quick start

use std::collections::HashMap;

use iceberg::CatalogBuilder;
use iceberg_catalog_s3tables::{
    S3TABLES_CATALOG_PROP_ENDPOINT_URL, S3TABLES_CATALOG_PROP_TABLE_BUCKET_ARN,
    S3TablesCatalogBuilder,
};

#[tokio::main]
async fn main() {
    let catalog = S3TablesCatalogBuilder::default()
        .with_endpoint_url("http://localhost:4566")
        .load(
            "s3tables",
            HashMap::from([(
                S3TABLES_CATALOG_PROP_TABLE_BUCKET_ARN.to_string(),
                "arn:aws:s3tables:us-east-1:123456789012:bucket/my-bucket".to_string(),
            )]),
        )
        .await
        .unwrap();

    // use `catalog` as any Iceberg Catalog
}

See the API documentation for the full API surface.