You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "theelderbeever (via GitHub)" <gi...@apache.org> on 2025/09/23 04:16:51 UTC
Re: [D] Example for reading from a delta table [datafusion]
GitHub user theelderbeever closed a discussion: Example for reading from a delta table
As the title says. Looking for an example on how to read from a deltalake table. Is this even possible yet? I have started with something like below. Do I need to implement my own TableProvider somewhere or does anyone know if one already exists?
```rust
let mut table = match open_table("data/metrics").await {
Ok(tbl) => tbl,
Err(_) => {
let ops = DeltaOps::try_from_uri("data/metrics").await?;
ops.create()
.with_table_name("metrics")
.with_columns(VectorMetric::columns())
.await?
}
};
let mut ctx = SessionContext::new();
ctx.register_table("metrics", Arc::new(table)).unwrap();
```
GitHub link: https://github.com/apache/datafusion/discussions/7843
----
This is an automatically sent email for github@datafusion.apache.org.
To unsubscribe, please send an email to: github-unsubscribe@datafusion.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org