superset
superset copied to clipboard
[sqllqb] Superset always fires "show create view" although it is a table which results in "error while fetching table metadata"
Bug description
Superset version : 3.0.3
Error in show table schema / fetching metadata Superset always fires "show create view" although it is a table which results in "error while fetching table metadata"
How to reproduce the bug
- Go to sqllab.
- select database
- Select schema
- Select a table (not view)
Screenshots/recordings
Screenshot:
UI Screenshot:
Superset version
master / latest-dev
Python version
3.11
Node version
Not applicable
Browser
Chrome
Additional context
No response
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@rabindragogoi Could you please upgrade your Superset version to 3.0.3 and see if the bug still happens? As pointed out by the issue instructions:
If your environment does not match the alternatives, you need to upgrade your environment before submitting the issue as it may have already been fixed.
I'll close the issue but please re-open it if the bug persists in 3.0.3.
@michael-s-molina : In logs there shows up no error but in the UI still I can see the error popup though I am a user of the Admin role
@rabindragogoi is this reproducible in 3.0.3?
@michael-s-molina : yes
@rabindragogoi Thanks for checking. I reopened the issue and updated the version in the description.
@justinpark Could you take a look?
@rabindragogoi I suspect that this might be an issue with Trino, as it appears that the same view name has been used for the selected table.
https://github.com/apache/superset/blob/75a98af64bb1f1f2ac8e98a337d0b26ad60bcca5/superset/db_engine_specs/trino.py#L101-L105
Have you experienced the same error when choosing other tables?
@justinpark : we are not using which will call Trino.py. We are using pyhive. But the difference I can see between 3.0.0 and 3.03 is the error is not showing up in logs but in UI the pop up is coming up though I am admin user.
If I try to remove the table schema from the pop up then it shows up the above error. For an admin user it should not pop up to communicate to administrator. Is any permission missing for Admin?
Note: I used a fresh metastore db for it so I believe Admin should have all required permissions.
@justinpark : Answer your question : I am facing this issue not for all the tablein 3.0.3.
@justinpark : When the above error pops up for one of the table then in logs we see this.
Any idea?
@rabindragogoi Could you share the network error shown in the chrome dev. console here?
@justinpark :
@justinpark , @michael-s-molina : I noticed that if the table has a partition then it throws up the error with the error popup where as if the table does not have partition it returns results. In backend presto cli ever
Could you please very that?
In 3.0.0 version it was throwing error for all the tables but after upgrading from 3.0.0 to 3.0.3 only for few tables it is throwing error. I think we are almost there a slight modification will fix the code. (may be in file : site-packages/superset/db_engine_specs/presto.py )
In case it helps, we are also experiencing this error: An error occurred while removing the schema ...in version 3.1.0 (SHA: 3de71e25) of Superset, with pyhive 0.7.0 connecting to Presto.
I have noticed it in the context of troubleshooting https://github.com/apache/superset/issues/25636
We did previously see show create view being called against a table, but this does not seem to be present in the logs since version 3.1.0
I'm happy to try a patch if you have anything that you would like testing. Thanks.
@justinpark : Any other work around you want me to try?
@rabindragogoi From the details in both the console and browser error logs, it appears that the issue might be stemming from your connection configuration, not necessarily from superset.
@john-bodley @betodealmeida Do you have any insights regarding this issue?
@justinpark : This is a warning and this we had in superset 1.5.2 as well. In 1.5.2 we encountered no issue and all were working good. Once we upgrade to 3.0.0 and 3.0.3 we are facing this issue.
The issue that I am facing is exactly the same what @tullis is facing in https://github.com/apache/superset/issues/25636 . It is throwing error when the underneath table is a partition table and PARQUET file format.
@justinpark , @michael-s-molina : Since it is showing error while querying on top of presto database connection, I created a new Trino connection and tried but it was failing. The same connection is working well in 1.5.2 but not in superset 3.0.3
I raised an another issue for it : https://github.com/apache/superset/issues/26768
Please let me know if you find any solution.
Thanks
Re-opening because the fix was reverted in https://github.com/apache/superset/pull/28613.