diff --git a/superset/views/core.py b/superset/views/core.py index 15ff3b1620e92..12b04dd706c4d 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -889,8 +889,11 @@ def explore( except (SupersetException, SQLAlchemyError): datasource_data = dummy_datasource_data + columns: List[Dict[str, Any]] = [] if datasource: datasource_data["owners"] = datasource.owners_data + if isinstance(datasource, Query): + columns = datasource.extra.get("columns", []) bootstrap_data = { "can_add": slice_add_perm, @@ -905,6 +908,7 @@ def explore( "user": bootstrap_user_data(g.user, include_perms=True), "forced_height": request.args.get("height"), "common": common_bootstrap_payload(), + "columns": columns, } if slc: title = slc.slice_name