superset: SQL Lab does not show table names in the dropdown box
A clear and concise description of what the bug is.
While selecting Database, schema, and table to inspect the table structure, I noticed that the table dropdown box only shows the schema name, not the table name. If I try selecting any of the options, I get an An error occurred while fetching table metadata error.
Expected results
I can see the columns that belong to the table
Actual results
An An error occurred while fetching table metadata error message appear
Screenshots
How to reproduce the bug
- Go to ‘SQL Lab > SQL Editor’
- Click on any Database in the dropdown box
- After refreshing the schema dropdown box, select any schema with tables
- Check the tables dropdown box. It should appear only the schema name, not the tables name
Environment
- superset version:
0.37.1 - python version:
Python 3.6.12 - node.js version: N/A
- npm version: N/A
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (5 by maintainers)
Issue-Label Bot is automatically applying the label
#bugto this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
It is a bug in pyhive:
https://github.com/dropbox/PyHive/blob/master/pyhive/sqlalchemy_hive.py#L364
That line should not return
row[0]since the result will be the schema name, not the table name. I’m going to propose a fix in pyhive.Meanwhile, can this issue keep opened until pyhive team accept and fixes in latest releases?
Edit: Problem is even worse. See https://github.com/dropbox/PyHive/issues/146 I’ll see how to workaround this.
Tracking requests from Superset UI, I see that when you select a Database the following URL is requested:
Which returns a JSON with the following contents and populates the Schema selector:
When you select any schema, the following URL is requested:
This undefined in the URL clearly indicates that the Schema selector is not building the component correctly.
I’m still debugging the code and if I have a fix I’ll cook a PR for it. Stay tuned!
Edited: hmm, so undefined seems acceptable but anyways the code that responds for that URL seems the issue. Still investigating.