-
Notifications
You must be signed in to change notification settings - Fork 15
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
Setting table_type = 'EXTERNAL_TABLE' builds a 'MANAGED_TABLE' #41
Comments
Adding an explicit Table Parameter of {'EXTERNAL': 'TRUE'} to the table builder object seems to trick Hive (3.0.0) into creating the table as an EXTERNAL_TABLE instead of a MANAGED_TABLE. I think it completely ignores the table_type setting. |
Unfortunately, although I can query a created in presto manually, I get 0 rows back from an identical table created (with a different name) using this client. So even though the "SHOW CREATE TABLE" command outputs are now identical, and the TBL_TYPE is now correct, there is something else not quite right - still investigating. |
To follow up on the investigation into the 0 rows issue after the table was re-created. That one example I was testing appears to have had an underlying storage issue. Once that was resolved, the queries worked. I've gone back and recreated 75 of my tables now with the extra Table Parameter set, and that switched them all to EXTERNAL_TABLE when I did so and they started working. |
Hi @rotten thank you for opening this issue! As far as I know, after digging in the code and testing the possibilities this is a bug from Hive Metastore Server. |
Sorry to open one more...
When I create an external table it ends up being created as a managed table.
However when I look in the metastore postgresql database for that table:
fwiw,
create table WITH (external_location = xxx)
works fine from the presto client and creates the EXTERNAL_TABLE type in the database.I'm still looking for a root cause or work-around, but thought I'd log what I've run into while I'm looking. Your examples and tests don't include creating an external table.
The text was updated successfully, but these errors were encountered: