druid:sql查询和json查询

json格式查询

http://xx.25.xx.64:18082/druid/v2

{        
	"filter": {        
		"type": "or",
		        "fields": [            {                
			"type": "selector",
			                "dimension": "event",
			                "value": "interface"            
		}        ]    
	},
	   "queryType": "select",
	   "dataSource": "apprenrenzhibo-app_statistic",
	   "descending": "false",
	   "dimensions": [],
	   "metrics": [],
	   "granularity": "all",
	   "intervals": [     "2019-08-06T16:00:00.000Z/2019-08-14T16:00:00.000Z"   ],
	   "pagingSpec": {
		"pagingIdentifiers": {},
		"threshold": 5
	}
}
sql格式查询

http://xx.25.xx.64:18082/druid/v2/sql

{
	"query": "select distinct gender from \"apprenrenwang-app_statistic\" where __time > '2018-08-06 00:00:00' limit 10",
	"context": {
		"sqlTimeZone": "Asia/Shanghai"
	}
}
posted @ 2019-12-11 14:57  Adamanter  阅读(1321)  评论(0编辑  收藏  举报