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 [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to