Skip to content

Instantly share code, notes, and snippets.

@zhuqling
Created October 23, 2018 01:36
Show Gist options
  • Save zhuqling/f659c951160ad300436ab58ec926a23a to your computer and use it in GitHub Desktop.
Save zhuqling/f659c951160ad300436ab58ec926a23a to your computer and use it in GitHub Desktop.
druid.io schema示例
{
"dataSource": "wikiticker",
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "day",
"queryGranularity": "none",
"intervals": ["2017-01-19/2017-01-20"]
},
"parser": {
"type": "string",
"parseSpec": {
"format": "json",
"dimensionsSpec": {
"dimensions": [
"channel",
"cityName",
"comment",
"countryIsoCode",
"countryName",
"isAnonymous",
"isMinor",
"isNew",
"isRobot",
"isUnpatrolled",
"metroCode",
"namespace",
"page",
"regionIsoCode",
"regionName",
"user"
]
},
"timestampSpec": {
"format": "auto",
"column": "time"
}
}
},
"metricsSpec": [
{
"name": "count",
"type": "count"
},
{
"name": "added",
"type": "longSum",
"fieldName": "added"
},
{
"name": "deleted",
"type": "longSum",
"fieldName": "deleted"
},
{
"name": "delta",
"type": "longSum",
"fieldName": "delta"
},
{
"name": "user_unique",
"type": "hyperUnique",
"fieldName": "user"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment