-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error: table_type
missing from table parameters when loading table from Hive metastore
#1150
Comments
In iceberg-python/pyiceberg/catalog/hive.py Lines 524 to 527 in d587e67
The error here is the 2nd step. It is expected that the hive table has a property iceberg-python/pyiceberg/catalog/hive.py Lines 274 to 285 in d587e67
Who created the table in this case? When PyIceberg creates the table, it injects the iceberg-python/pyiceberg/catalog/hive.py Line 373 in d587e67
|
I suppose it was created by a third-party and not by |
Anyone can create an iceberg table using HMS, which can be read by PyIceberg. In HMS, the assumption is that iceberg tables have a specific property set so that engines can distinguish between hive and iceberg tables. In this case, the table was created as a "hive table" and not an "iceberg table". |
@kevinjqliu thanks for the info 🙏. Just two more questions:
|
You can use an engine (like Spark/Trino) to interact with the Hive table to add the extra table parameter. Alternatively, a hacky way is to use hive client in pyiceberg. Like so iceberg-python/pyiceberg/catalog/hive.py Lines 570 to 574 in d587e67
it should work, but definitely test it out first
Nope, adding that specific parameter to HMS is how the iceberg table is defined. |
Apache Iceberg version
main (development)
Please describe the bug 🐞
I'm (a user of tap-iceberg is) running into the following error when trying to load a Hive table using
pyiceberg
.The call in question is https://github.com/shaped-ai/tap-iceberg/blob/38064b3aaca5394ba1482970e790d3e2f6020946/tap_iceberg/tap.py#L94.
It seems the loaded table is missing the table type parameter in
iceberg-python/pyiceberg/catalog/hive.py
Lines 329 to 331 in d587e67
?
Thanks in advance if this turns out to be user error 😃
The text was updated successfully, but these errors were encountered: