superset待改进的功能

本文探讨了Superset平台在实际应用中遇到的问题,包括页面加载速度慢、模板定制困难、视图数据处理限制及代码结构不清晰等问题,并提出了可能的优化方向。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. 其他地方缺少用户整体信息查看的入口,只有在每次登录的时候,从一个地方可以进入
  2. 前后端不分离,页面加载慢
  3. flaskappbuilder虽然方便开发,但是模版不太好改
  4. 视图不能分页查询,数据量大时,页面渲染不出来
  5. superset的代码结构不是按功能分割,所有的视图都在views文件夹,模型在models文件夹。如果按功能来划分,代码结构会更清晰
  6. 页面样式简单,不够美观
  7. 不能随意的调整菜单的顺序,菜单的顺序是根据appbuilder注册的顺序决定的
  8. 创建报表的页面只能进行单表查询,如果需要分析联表查询的话,需要在sql工具箱进行联表查询,把结果保存下来,在进行可视化分析
  9. 没有可以下钻的图表,没有普通的折线图,只有时间序列折线图,没有组合图
  10. 不能进行图内修改,例如,对图表的结果进行过滤,只展示某一部分的值,设置预警条件等,这一块可以参考BDP,它的功能很完善,很强大
  11. 报表和看板没有分类功能,不利于查找某个主题的所有报表或者看板

备注:

  1. flaskappbuilder新增了rest api,可以考虑使用它提供的接口来restful风格的接口
def explore_json( self, datasource_type: str | None = None, datasource_id: int | None = None ) -> FlaskResponse: """Serves all request that GET or POST form_data This endpoint evolved to be the entry point of many different requests that GETs or POSTs a form_data. `self.generate_json` receives this input and returns different payloads based on the request args in the first block TODO: break into one endpoint for each return shape""" response_type = ChartDataResultFormat.JSON.value responses: list[ChartDataResultFormat | ChartDataResultType] = list( ChartDataResultFormat ) responses.extend(list(ChartDataResultType)) for response_option in responses: if request.args.get(response_option) == "true": response_type = response_option break # Verify user has permission to export CSV file if ( response_type == ChartDataResultFormat.CSV and not security_manager.can_access("can_csv", "Superset") ): return json_error_response( _("You don't have the rights to download as csv"), status=403, ) form_data = get_form_data()[0] try: datasource_id, datasource_type = get_datasource_info( datasource_id, datasource_type, form_data ) force = request.args.get("force") == "true" # TODO: support CSV, SQL query and other non-JSON types if ( is_feature_enabled("GLOBAL_ASYNC_QUERIES") and response_type == ChartDataResultFormat.JSON ): # First, look for the chart query results in the cache. with contextlib.suppress(CacheLoadError): viz_obj = get_viz( datasource_type=cast(str, datasource_type), datasource_id=datasource_id, form_data=form_data, force_cached=True, force=force, ) payload = viz_obj.get_payload() # If the chart query has already been cached, return it immediately. if payload is not None: return self.send_data_payload_response(viz_obj, payload) # Otherwise, kick off a background job to run the chart query. # Clients will either poll or be notified of query completion, # at which point they will call the /explore_json/data/<cache_key> # endpoint to retrieve the results. try: async_channel_id = ( async_query_manager.parse_channel_id_from_request(request) ) job_metadata = async_query_manager.submit_explore_json_job( async_channel_id, form_data, response_type, force, get_user_id() ) except AsyncQueryTokenException: return json_error_response("Not authorized", 401) return json_success(json.dumps(job_metadata), status=202) viz_obj = get_viz( datasource_type=cast(str, datasource_type), datasource_id=datasource_id, form_data=form_data, force=force, ) return self.generate_json(viz_obj, response_type) except SupersetException as ex: return json_error_response(utils.error_msg_from_exception(ex), 400)解释代码
03-12
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值