Skip to content

[Bug]: unity catalog request GetTableResponse error #3997

@therishidesai

Description

@therishidesai

What happened?

I am using the unity-experimental feature to open a unity catalog via Databricks. I can manually curl the unity catalog table justfine using the following command:

curl -v   -H "Authorization: Bearer $DATABRICKS_ACCESS_TOKEN"   "https://DATABRICKS_WORKSPACE_URL/api/2.1/unity-catalog/tables/test.test_schema.test_table"

But when I run the rust code it fails:

    // Use your actual catalog.schema.table here:
    let uc_uri = "uc://test.test_schema.test_table";

    println!("Opening Unity Catalog table: {uc_uri}");

    // 1) Open the table via UC
    let table = open_table(url::Url::parse(uc_uri).unwrap()).await?;
    println!("Delta version: {:?}", table.version());
    println!("Number of files: {:?}", table.get_file_uris().unwrap().count());

The error I get is the following:

Error: GenericError { source: RequestError { source: reqwest::Error { kind: Decode, source: Error("data did not match any variant of untagged enum GetTableResponse", line: 0, column: 0) } } }

Expected behavior

I would expect it to decode the response since the curl request is working.

Operating System

Linux

Binding

Rust

Bindings Version

0.29.4

Steps to reproduce

No response

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions