You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/06 02:47:58 UTC
[GitHub] [incubator-druid] pzhdfy opened a new pull request #7594: [for
master] general exactly count distinct support in Druid
pzhdfy opened a new pull request #7594: [for master] general exactly count distinct support in Druid
URL: https://github.com/apache/incubator-druid/pull/7594
The detailed design and discussion is in issue https://github.com/apache/incubator-druid/issues/6716
**Target**
support general exactly count distinct in Druid
**Attention**
the pr is for branch master, pr for 0.12.x is here(https://github.com/apache/incubator-druid/pull/7582)
**Usage**
1. configure to use extension druid-uniq: druid.extensions.loadList=[...,"druid-uniq"]
2. define a unique metric in metricsSpec at Ingestion time
` "metricsSpec": [
{
"type": "count",
"name": "count"
},
{
"name": "author_id_distinct",
"type": "unique",
"fieldName": "author_id"
}
],`
3. define a unique metric in aggregations at query time
`{
"queryType": "timeseries",
"postAggregations": [],
"granularity": "ALL",
"dataSource": "druid_hadoop_task_example",
"intervals": "2018-04-24T00:00:00+08:00/2018-04-26T00:00:00+08:00",
"aggregations": [
{
"name": "count",
"type": "count"
},
{
"name": "author_id_distinct",
"type": "unique",
"fieldName": "author_id_distinct"
}
]
}`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org