iceberg

Crates.ioiceberg
lib.rsiceberg
version0.4.0
sourcesrc
created_at2021-08-09 15:01:28.096758+00
updated_at2024-12-24 02:38:49.014898+00
descriptionApache Iceberg Rust implementation
homepagehttps://rust.iceberg.apache.org/
repositoryhttps://github.com/apache/iceberg-rust
max_upload_size
id433771
size1,901,873
Renjie Liu (liurenjie1024)

documentation

README

Apache Iceberg Official Native Rust Implementation

crates.io docs.rs

This crate contains the official Native Rust implementation of Apache Iceberg.

See the API documentation for examples and the full API.

Usage

use futures::TryStreamExt;
use iceberg::io::{FileIO, FileIOBuilder};
use iceberg::{Catalog, Result, TableIdent};
use iceberg_catalog_memory::MemoryCatalog;

#[tokio::main]
async fn main() -> Result<()> {
    // Build your file IO.
    let file_io = FileIOBuilder::new("memory").build()?;
    // Connect to a catalog.
    let catalog = MemoryCatalog::new(file_io, None);
    // Load table from catalog.
    let table = catalog
        .load_table(&TableIdent::from_strs(["hello", "world"])?)
        .await?;
    // Build table scan.
    let stream = table
        .scan()
        .select(["name", "id"])
        .build()?
        .to_arrow()
        .await?;

    // Consume this stream like arrow record batch stream.
    let _data: Vec<_> = stream.try_collect().await?;
    Ok(())
}
Commit count: 435

cargo fmt