Skip to content

NoMetadata error when reading detlatable #1562

Closed
@finlaydotb

Description

@finlaydotb

Environment

Delta-rs version: 0.13.0

Binding:

Environment:

  • Cloud provider: Local
  • OS: MacOS
  • Other:

Bug

What happened:

  • I write to a detla table,
  • I can successfully read the table and query using datafusion
  • I repeat the same write in the first step
  • Now when I try to read using the same code that initially worked, I now get the error

thread 'main' panicked at 'called Result::unwrap() on an Err value: NoMetadata', /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deltalake-0.13.1/src/delta_datafusion.rs:432:35
stack backtrace:
0: rust_begin_unwind

What you expected to happen:

To be able to read the delta lake table

How to reproduce it:

Write to a delta table path using code similar to this

    let table = DeltaTableBuilder::from_uri(path)
        .with_storage_options(storage_options)
        .build()
        .unwrap();
    
    let ops = DeltaOps::from(table);

    ops.write(vec![...]).await?;

The query using datafusion with code similar to this

    let mut table = deltalake::open_table_with_storage_options("s3://path/to/table", get_storage_options())
            .await?;

    let mut ctx = SessionContext::new();
    ctx.register_table("demo", Arc::new(table)).unwrap();
    let df = ctx.sql("select * from test").await?;
    df.show().await?;

now repeat the write, and then the reading, the reading will now fail with the above error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions