iceberg-rs

Crates.ioiceberg-rs
lib.rsiceberg-rs
version0.1.1-beta.1
created_at2022-04-16 12:43:48.405001+00
updated_at2025-05-09 21:29:54.917315+00
descriptionDEPRECATED: This crate is no longer maintained. Please use the `iceberg` crate instead.
homepagehttps://github.com/oliverdaff/iceberg-rs
repositoryhttps://github.com/oliverdaff/iceberg-rs
max_upload_size
id568954
size77,125
Oliver Daff (oliverdaff)

documentation

README

iceberg-rs

⚠️ DEPRECATED: This crate is no longer maintained. Please use the official Apache Iceberg Rust implementation instead.


This repository previously contained a Rust implementation of the Apache Iceberg table format.

We recommend migrating to the official crate:

The official implementation offers comprehensive features, including:

  • Table operations: create, read, update, delete
  • Schema evolution and hidden partitioning
  • Time travel and snapshot isolation
  • View and materialized view support
  • Multiple catalog implementations: REST, AWS Glue, File-based
  • Integration with Apache Arrow and DataFusion

For more details, visit the official documentation.


The Iceberg is an open table format for analytic datasets. It is very convenient to access the Iceberg table information to do things like view schema details, track changes, and view snapshots. This project is a Rust implementation of the Iceberg spec.

Iceberg-rs in action

use iceberg_rs::model::table::TableMetadataV2;

fn main() {
   let data = r#"
       {
           "format-version" : 2,
           "table-uuid": "fb072c92-a02b-11e9-ae9c-1bb7bc9eca94",
           "location": "s3://b/wh/data.db/table",
           "last-sequence-number" : 1,
           "last-updated-ms": 1515100955770,
           "last-column-id": 1,
           "schemas": [
               {
                   "schema-id" : 1,
                   "type" : "struct",
                   "fields" :[
                       {
                           "id": 1,
                           "name": "struct_name",
                           "required": true,
                           "field_type": "fixed[1]"
                       }
                   ]
               }
           ],
           "current-schema-id" : 1,
           "partition-specs": [
               {
                   "spec-id": 1,
                   "fields": [
                       {  
                           "source-id": 4,  
                           "field-id": 1000,  
                           "name": "ts_day",  
                           "transform": "day"
                       } 
                   ]
               }
           ],
           "default-spec-id": 1,
           "last-partition-id": 1,
           "properties": {
               "commit.retry.num-retries": "1"
           },
           "metadata-log": [
               {  
                   "metadata-file": "s3://bucket/.../v1.json",  
                   "timestamp-ms": 1515100
               }
           ],
           "sort-orders": [],
           "default-sort-order-id": 0
       }
   "#;
    let metadata = serde_json::from_str::<TableMetadataV2>(&data).unwrap();
 
}

Features

Currently supported:

  • Parsing table metadata v2.

Coming soon:

  • Manifest files.
  • Manifest lists.
  • v1 table metadata support.
  • Validation.

Iceberg Model

Diagram showing the main nouns of the Iceberg model.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         
β”‚Table                              β”‚         
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”˜         
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”β”Œβ–½β”€β”€β”€β”€β”€β”β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Partition Specβ”‚β”‚Snapshotβ”‚β”‚Schemaβ”‚β”‚Sort Orderβ”‚
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”¬β”€β”€β”€β”€β”€β”˜β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–½β”€β”€β”β”Œβ”€β”€β”€β–½β”€β”€β”€β”€β”€β”€β”   
β”‚Partition Fieldβ”‚β”‚Struct Fieldβ”‚β”‚Sort Fieldβ”‚   
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”                                   
β”‚Transformβ”‚                                   
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                   

Contributing

If you’d like to contribute, please fork the repository and use a feature branch. We warmly welcomed pull requests.

Please validate all submission with make validate.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted to include in Iceberg-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, with no additional terms or conditions.
Commit count: 37

cargo fmt