superset icon indicating copy to clipboard operation
superset copied to clipboard

sql lab hive 、Spark SQL get tablename list error, Source code error found

Open mdzz9527 opened this issue 9 months ago • 1 comments

Bug description

superset/db_engine_specs/hive.py ‘ def get_view_names’ is mistake, hive no 'SHOW VIEWS' Syntax

How to reproduce the bug

delete this get_view_names, or instead of 'SHOW TABLES'

Screenshots/recordings

No response

Superset version

3.1.3

Python version

3.11

Node version

I don't know

Browser

Chrome

Additional context

No response

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] 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.

mdzz9527 avatar May 13 '24 06:05 mdzz9527

To resolve the issue with get_view_names in superset/db_engine_specs/hive.py due to Hive not supporting the 'SHOW VIEWS' syntax, consider modifying the method to use SHOW TABLES and then filter out the views if possible. This approach requires adjusting the method to accommodate Hive's limitations. Alternatively, if you have access to the Hive Metastore database, you could directly query it to list all views, though this requires appropriate permissions.

If you're comfortable with modifying your local Superset installation, you could patch the get_view_names method to handle Hive's syntax limitations. Checking for updates or newer versions of Superset might also be beneficial, as there could be a fix or configuration option available that addresses this issue.

These workarounds aim to help you navigate the compatibility issue with Hive and ensure your Superset setup can correctly list table names. If you need further assistance or have more questions, feel free to ask.

Details

Sources


About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

dosubot[bot] avatar May 13 '24 06:05 dosubot[bot]