Crate iceberg_catalog_rest

Source
Expand description

Iceberg REST API implementation.

To build a rest catalog with configurations

§Example

use std::collections::HashMap;

use iceberg::CatalogBuilder;
use iceberg_catalog_rest::{
    REST_CATALOG_PROP_URI, REST_CATALOG_PROP_WAREHOUSE, RestCatalogBuilder,
};

#[tokio::main]
async fn main() {
    let catalog = RestCatalogBuilder::default()
        .load(
            "rest",
            HashMap::from([
                (
                    REST_CATALOG_PROP_URI.to_string(),
                    "http://localhost:8181".to_string(),
                ),
                (
                    REST_CATALOG_PROP_WAREHOUSE.to_string(),
                    "s3://warehouse".to_string(),
                ),
            ]),
        )
        .await
        .unwrap();
}

Structs§

RestCatalog
Rest catalog implementation.
RestCatalogBuilder
Builder for RestCatalog.

Constants§

REST_CATALOG_PROP_URI
REST catalog URI
REST_CATALOG_PROP_WAREHOUSE
REST catalog warehouse location