Skip to content

Presto JSON data type schema issue in SQL Editor #20216

Closed
@xingyc15

Description

In the SQL Editor (SQL Lab), with Presto connection, we have a table with a column in JSON data type. When I choose that table, the schema cannot show up, and raise an error called 'An error occurred while fetching metadata'.

While in our presto backend, the get column sql query has already finished and succeed. So this might be a UI bug in Superset?

And here is the Superset backend error log:

2022-05-27 17:53:57,770:DEBUG:urllib3.connectionpool:http://presto-coordinator.pinot:8080 "GET /v1/statement/queued/20220527_175357_00149_rexug/1?slug=xbd39bf9421cd4959b940afc8553b8b30 HTTP/1.1" 200 341
2022-05-27 17:53:57,973:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): presto-coordinator.pinot:8080
2022-05-27 17:53:57,975:DEBUG:urllib3.connectionpool:http://presto-coordinator.pinot:8080 "GET /v1/statement/queued/20220527_175357_00149_rexug/2?slug=xbd39bf9421cd4959b940afc8553b8b30 HTTP/1.1" 200 867
10.41.44.206 - - [27/May/2022:17:53:57 +0000] "GET /superset/extra_table_metadata/4/metrics/default/ HTTP/1.1" 200 14 "https://superset.staging.xxx.ai/superset/sqllab/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"
Triggering query_id: 2148
2022-05-27 17:53:58,250:INFO:superset.sqllab.command:Triggering query_id: 2148
Failed to execute query '2148' - 'None': Can't compile non template nodes
2022-05-27 17:53:58,264:ERROR:superset.views.core:Failed to execute query '2148' - 'None': Can't compile non template nodes
10.41.44.206 - - [27/May/2022:17:53:58 +0000] "POST /superset/sql_json/ HTTP/1.1" 500 102 "https://superset.staging.xxx.ai/superset/sqllab/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"

How to reproduce the bug

  1. Choose a presto db
  2. Select the table with a column in JSON data type

Expected results

The whole schema should show up.

Actual results

No schema show up.

Screenshots

Here is the error message:

Screen Shot 2022-05-27 at 10 45 15 AM

Environment

  • superset version: 1.5.0
  • python version: 3.8.12

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [Y] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [Y] I have reproduced the issue with at least the latest released version of superset.
  • [Y] I have checked the issue tracker for the same issue and I haven't found one similar.

Metadata

Assignees

No one assigned

    Labels

    #bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions