-
Notifications
You must be signed in to change notification settings - Fork 418
Closed
Description
Apache Iceberg version
main (development)
Please describe the bug 🐞
Reproduction Steps
- Load a catalog named
test_catalog. - Create a table named
test_namespace.test_tabletable inside of it. - Provide the following variations of this table's identifier to
catalog.load_table, and ensure that the 3rd variation usingtable.identifierfails due to inclusion of the catalog's name (test_catalog) @table.identifier[0]:
table = catalog.load_table("test_namespace.test_table") # string identifier works...
table = catalog.load_table(("test_namespace", "test_table")) # tuple identifier also works...
catalog.load_table(table.identifier) # pyiceberg.exceptions.NoSuchTableError: NoSuchTableException: Table does not exist: test_catalog.test_namespace.test_tableA more interesting question that I'd like to open for discussion as part of this issue is the best way to fix it. For example, we could argue that the bug lies with catalog.load_table() for not handling the catalog name as part of the identifier. Alternatively, we could argue that table.identifier shouldn't include the catalog name in the first place.
As a workaround in my code for now, I've created a wrapper method for catalog.load_table(identifier) that scrubs the current catalog's name from the given identifier before forwarding it to catalog.load_table(identifier).
Environment Info
Iceberg REST Catalog running in the tabulario/iceberg-rest Docker container w/ a mock S3 Filesystem:
def catalog_properties() -> Dict[str, str]:
return {
"type": "rest",
"uri": "http://localhost:8181",
"s3.endpoint": "http://localhost:9000",
"s3.access-key-id": "admin",
"s3.secret-access-key": "password",
}
load_catalog(name="test_catalog", **catalog_properties())Metadata
Metadata
Assignees
Labels
No labels