11 releases (6 breaking)
new 0.7.0 | Jan 24, 2025 |
---|---|
0.5.0 | Nov 24, 2024 |
0.1.3 | Jul 3, 2024 |
0.1.0 | Feb 6, 2024 |
#119 in Database interfaces
3,539 downloads per month
Used in 5 crates
(2 directly)
2MB
41K
SLoC
A native Rust library for Delta Lake, with bindings to Python
Python docs
·
Rust docs
·
Report a bug
·
Request a feature
·
Roadmap
The Delta Lake project aims to unlock the power of the Deltalake for as many users and projects as possible by providing native low-level APIs aimed at developers and integrators, as well as a high-level operations API that lets you query, inspect, and operate your Delta Lake with ease.
Source | Downloads | Installation Command | Docs |
---|---|---|---|
PyPi | pip install deltalake |
Docs | |
Crates.io | cargo add deltalake |
Docs |
Table of contents
Quick Start
The deltalake
library aims to adopt patterns from other libraries in data processing,
so getting started should look familiar.
from deltalake import DeltaTable, write_deltalake
import pandas as pd
# write some data into a delta table
df = pd.DataFrame({"id": [1, 2], "value": ["foo", "boo"]})
write_deltalake("./data/delta", df)
# Load data from the delta table
dt = DeltaTable("./data/delta")
df2 = dt.to_pandas()
assert df.equals(df2)
The same table can also be loaded using the core Rust crate:
use deltalake::{open_table, DeltaTableError};
#[tokio::main]
async fn main() -> Result<(), DeltaTableError> {
// open the table written in python
let table = open_table("./data/delta").await?;
// show all active files in the table
let files: Vec<_> = table.get_file_uris()?.collect();
println!("{:?}", files);
Ok(())
}
You can also try Delta Lake docker at DockerHub | Docker Repo
Get Involved
We encourage you to reach out, and are committed to provide a welcoming community.
- Join us in our Slack workspace
- Report an issue
- Looking to contribute? See our good first issues.
Integrations
Libraries and frameworks that interoperate with delta-rs - in alphabetical order.
Features
The following section outlines some core features like supported storage backends and operations that can be performed against tables. The state of implementation of features outlined in the Delta protocol is also tracked.
Cloud Integrations
Storage | Rust | Python | Comment |
---|---|---|---|
Local | |||
S3 - AWS | |||
S3 - MinIO | |||
S3 - R2 | |||
Azure Blob | |||
Azure ADLS Gen2 | |||
Microsoft OneLake | |||
Google Cloud Storage | |||
HDFS | |||
LakeFS | Python: Rust engine writer only supported |
Supported Operations
Operation | Rust | Python | Description |
---|---|---|---|
Create | Create a new table | ||
Read | Read data from a table | ||
Vacuum | Remove unused files and log entries | ||
Delete - predicates | Delete data based on a predicate | ||
Optimize - compaction | Harmonize the size of data file | ||
Optimize - Z-order | Place similar data into the same file | ||
Merge | Merge a target Delta table with source data | ||
Update | Update values from a table | ||
Add Column | Add new columns or nested fields | ||
Add Feature | Enable delta table features | ||
Add Constraints | Set delta constraints, to verify data on write | ||
Drop Constraints | Removes delta constraints | ||
Set Table Properties | Set delta table properties | ||
Convert to Delta | Convert parquet table to delta table | ||
FS check | Remove corrupted files from table | ||
Restore | Restores table to previous version state |
Protocol Support Level
Reader Version | Requirement | Status |
---|---|---|
Version 2 | Column Mapping | |
Version 3 | Table Features (requires reader V7) |
Dependencies
~82MB
~1.5M SLoC