Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access table endpoint in REST catalog when table name contains a slash character (/) #710

Open
RoseGoldIsntGay opened this issue May 7, 2024 · 1 comment

Comments

@RoseGoldIsntGay
Copy link

Apache Iceberg version

0.4.0

Please describe the bug 馃悶

When trying to get a table containing a slash character in the name from the Iceberg REST catalog, pyiceberg doesn't url-encode the table name, resulting in an incorrect route.
e.g:
table name: /some/table
api route: v1/namespaces/schema/tables//some/table which returns HTTP Error 400

The table name that's sent to the REST api should be url-encoded resulting in v1/namespaces/schema/tables/%2Fsome%2Ftable which does in fact work.

Adding urllib.parse.quote_plus(identifier.name) in the following line should solve this issue.
https://github.com/apache/iceberg-python/blob/main/pyiceberg/catalog/rest.py#L356

@ndrluis
Copy link
Contributor

ndrluis commented May 10, 2024

Hello @RoseGoldIsntGay, how did you create this table? I couldn't find any specifications in the Iceberg documentation about naming, but I believe the convention is that names may only contain alphanumeric characters and the symbols _ or -.

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

2 participants