elasticsearch Vega Lite/Kibana管理URL对象的差异
我发现一个有趣的例子,它在Vega Lite上使用了几个数据模型。在关系数据库中,表格数据由类键组合而成
elasticsearch Vega Lite/Kibana管理URL对象的差异,
elasticsearch,kibana,vega-lite,vega,
elasticsearch,Kibana,Vega Lite,Vega,我发现一个有趣的例子,它在Vega Lite上使用了几个数据模型。在关系数据库中,表格数据由类键组合而成 { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "title": "Test", "datasets": { "stores": [ {&
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"title": "Test",
"datasets": {
"stores": [
{"cmdb_id1": 1, "group": "type1"},
{"cmdb_id1": 2, "group": "type1"},
{"cmdb_id1": 3, "group": "type2"}
],
"labelsTimelines": [
{"cmdb_id2": 1, "value": 83},
{"cmdb_id2": 2, "value": 53},
{"cmdb_id2": 3, "value": 23}
]
},
"data": {"name": "stores"},
"transform": [
{
"lookup": "cmdb_id1",
"from": {
"data": {"name": "labelsTimelines"},
"key": "cmdb_id2",
"fields": ["value"]
}
}
],
"mark": "bar",
"encoding": {
"y": {"aggregate": "sum", "field": "value", "type": "quantitative"},
"x": {"field": "group", "type": "ordinal"}
}
}
出现的问题是,使用构造是否可能获得相同的结果:
“数据”:{“url”:“…”}
已更改Elasticsearch查询的源:
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"datasets": {
"stores": [{
"url": {
"%context%": "true"
"index": "test_cmdb"
"body": {
"size": 1000,
"_source": ["cmdb_id", "street","group"]
}
}
format: {property: "hits.hits"}
}]}
"data": {
"name": "stores"
},
"encoding": {
"x": {"field": "url.body.size", "type": "ordinal", "title": "X"},
"y": {"field": "url.body.size", "type": "ordinal", "title": "Y"}
},
"layer": [
{
"mark": "rect",
"encoding": {
"tooltip": [
{"field": "url"}]
}
}
]
}
我知道有一个语法错误,数据不是来自Elasticsearch
提前谢谢
否,当前无法在顶级
数据集中指定URL数据。Vega Lite中的相关开放功能请求如下:。否,当前无法在顶级“数据集”中指定URL数据。Vega Lite中的相关开放功能请求如下: