Skip to content

Validation Error in ConfigResponse Model with RestCatalog in PyIceberg using Nessie REST API #11255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cee-shubham opened this issue Oct 4, 2024 · 3 comments

Comments

@cee-shubham
Copy link

Description:
I am encountering a validation issue while using the RestCatalog from PyIceberg (version 0.7.1) with the Nessie REST API (version 0.90.4). Specifically, the ConfigResponse model appears to expect the defaults and overrides fields, which are not being returned by the Nessie REST API. This results in a validation error when attempting to load the catalog using the load_rest() method.

Here is the configuration I am using:

catalog_config = {
"uri": "http://nessie:19120/api",
"warehouse": "s3://warehouse",
"s3.endpoint": "http://minio:9000",
"s3.access-key-id": "my_access_key",
"s3.secret-access-key": "my_secret_access_key",
"py-io-impl": "pyiceberg.io.pyarrow.PyArrowFileIO"
}

Attempting to load the catalog

catalog = load_rest("rest", **catalog_config)

Problems:
When I initially tried using load_catalog(), I encountered this error:
TypeError: load_catalog() takes from 0 to 1 positional arguments but 2 were given.

I switched to using load_rest() to work around this, but the following validation error occurred:
ValidationError: 'defaults' and 'overrides' fields are missing in the ConfigResponse model.

It appears that the Nessie REST API is not providing these fields, causing PyIceberg to fail during catalog initialization.

@heman026
Copy link

heman026 commented Jan 9, 2025

Hi @cee-shubham
I am getting the same error - ValidationError: 'defaults' and 'overrides' fields are missing in the ConfigResponse model.
Did you resolve it.

@lars-sorgalla
Copy link

I am encountering the same issue. I tried to comment out the "defaults" and "overrides" properties in the ConfigResponse model but then it failed elsewhere.

I'm wondering if there's a workaround for this.

@heman026
Copy link

@lars-sorgalla Check apache/iceberg-python#1524 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants