做网站哪个靠谱/百度问答下载安装

2020-01-02更新:
今天才想明白SQL Lab在这个场景中怎么使用,可以参考这篇文章:https://zhuanlan.zhihu.com/p/98173875
SQL Lab到数据源的流程:
对SQL 语句的执行结果选择“Explore”,会在tables表中增加一条记录,该记录的sql字段,是我们在SQL Edit中输入的内容。
如果在语句中带了where条件,会导致在slice界面左侧的filter等参数无效。此时,可以手工更新sql字段,把where条件去掉,到slice界面上设置参数。
原来写的内容其实和这个问题无关。
日常维护会手工查一些多表关联的数据,SQL语句的主体是固定的,只有过滤条件会变化。按现有的从SQL Lab到数据源的途径,没法修改WHERE后面的条件。所以要想办法修改过滤条件。
从后台的日志看,应该是explore_json接口:
127.0.0.1 - - [23/Dec/2019 10:21:16] "POST /superset/explore_json/ HTTP/1.1" 200 -
看起来是通用的接口:
@expose("/explore_json/", methods=EXPLORE_JSON_METHODS)
@etag_cache(CACHE_DEFAULT_TIMEOUT, check_perms=check_datasource_perms)
def explore_json(self, datasource_type=None, datasource_id=None):"""Serves all request that GET or POST form_dataThis endpoint evolved to be the entry point of many differentrequests that GETs or POSTs a form_data.`self.generate_json` receives this input and returns differentpayloads based on the request args in the first blockTODO: break into one endpoint for each return shape"""csv = request.args.get("csv") == "true"query = request.args.get("query") == "true"results = request.args.get("results") == "true"samples = request.args.get("samples") == "true"force = request.args.get("force") == "true"form_data = get_form_data()[0]try:datasource_id, datasource_type = get_datasource_info(datasource_id, datasource_type, form_data)except SupersetException as e:return json_error_response(utils.error_msg_from_exception(e))viz_obj = get_viz(datasource_type=datasource_type,datasource_id=datasource_id,form_data=form_data,force=force,)return self.generate_json(viz_obj, csv=csv, query=query, results=results, samples=samples)
所以,要具体问题具体分析,找到专门的处理函数才行。
第一个,Filters中的字段列表从哪里来:

待更新。。。