thhappy
thhappy

Reputation: 55

Reading delta-table from object_store (GCP, S3..) fails with InvalidTableLocation("Unknown scheme: s3")

Ultimately I like to use the deltalake crate from an objectstore other than the 3 supported (Azure, GCP, S3) but I am already failing to use it for the supported ones.

cargo.toml:

[dependencies]
deltalake = {version = "0.17.1", features = ["azure", "gcs", "s3"]}

soure-code:

use deltalake::{self,DeltaTableError};

#[tokio::main]
async fn main() -> Result<(),DeltaTableError> {
    let table_uri = "s3:///DE/customer";
    let delta_table = deltalake::open_table(table_uri).await?;
}

This produces the error: Error: InvalidTableLocation("Unknown scheme: s3")

When I was debugging I see that deltalake-core::table::builder::resolve_uri_type checks if the prefix is in the list of known schemes produced by factories() that is initialized with "memory://" and "file://", I am wondering how the other prefixes are added.

The build features "s3", etc does not have an impact.

What do I miss to configure?

Upvotes: 1

Views: 130

Answers (1)

Jonas Frei
Jonas Frei

Reputation: 382

The error can be resolved by adding the following line:

deltalake::aws::register_handlers(None);

Upvotes: 0

Related Questions