Comments (8)
I haven't implemented the aws glue catalog, so you might need to implement it yourself.
If you have the catalog writing looks something like this:
use iceberg_rust::arrow::write_parquet_partitioned;
// Get table from catalog
let tabular = catalog.load_table(Identifier::parse("my_catalog.my_schema.my_table")?);
// Make sure its a table and not a view
let table = if let Tabular::Table(table) = &tabular {
Ok(table)
} else {
Err(Error::InvalidFormat("database entity is not a table".to_string()))
}?;
// Write arrow batches to object_store
let metadata_files =
write_parquet_partitioned(table, arrow_batches, None)
.await?;
// Create table transaction
table
.new_transaction(None)
.append(metadata_files)
.commit()
.await?;
from iceberg-rust.
If you want to read iceberg tables with polars, this crate is not the best option for you. It's not able to do partition pruning with polars and always has to do a full table scan. The apache repo is working on an expression system that will make this possible.
However, if you use this crate with datafusion it performs partition pruning.
from iceberg-rust.
Hey, the crate supports inserting but no updates because it can't handle deletes. The best way to insert is with datafusion.
Check out this test:
iceberg-rust/datafusion_iceberg/src/table.rs
Line 650 in 7b65b34
Do you want to use it with datafusion or as a rust library?
from iceberg-rust.
Hi! Well I'll have to do some reading on datafusion. I'm not familiar with it. But I was hoping to use it in rust, with a polars code base I have.
from iceberg-rust.
For now, you can have a look at the following method:
iceberg-rust/datafusion_iceberg/src/table.rs
Line 521 in 7b65b34
I will try to simplify the writer design for non-datafusion use cases.
from iceberg-rust.
That would be awesome! Also I'd love to contribute - I've used the Java iceberg writer a bit, but if you had some diagram or pseudo code of the steps to complete a successful transaction (update, merge..erc) id be happy to help!
Also, do you have an example of how I could test the writer with aws glue?
from iceberg-rust.
I'm open to using datafusion to read the data, the real need I have is just to be able to write partitioned iceberg files using a glue catalog.
from iceberg-rust.
If I have time I'll look into the glue catalog. But it could be a while.
from iceberg-rust.
Related Issues (20)
- Implement ExprRewriter to filter partition columns
- Status of Writing to Iceberg? HOT 6
- Docker Image, CLI Client and Webserver HOT 1
- Inconsistent unit test HOT 3
- New home of the repository? HOT 1
- Project status HOT 3
- Change Catalog trait to allow REST catalog
- Adopt changes to Materialized View spec
- Relation to official iceberg-rust repo HOT 5
- Add Rest-catalog
- Use Trino Materialized View Spec
- fix datafile path with partition
- fix catalog interface
- Improve builders
- timestamp with timezone primitive type should be timestamptz HOT 1
- `README` mixes up `order_id` with `product_id` HOT 2
- Does this crate work with the python datafusion package? HOT 1
- Partition Datafusion plan by iceberg partitioning
- Storage partition join
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iceberg-rust.