mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
commit
09b1130810
12
examples/bin/examples/webstream/query.body
Normal file
12
examples/bin/examples/webstream/query.body
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"queryType": "groupBy",
|
||||||
|
"dataSource": "webstream",
|
||||||
|
"granularity": "all",
|
||||||
|
"dimensions": ["country"],
|
||||||
|
"aggregations":[
|
||||||
|
{ "type": "count", "name": "rows"},
|
||||||
|
{ "type": "doubleSum", "fieldName": "known_users", "name": "known_users"}
|
||||||
|
],
|
||||||
|
"filter": { "type": "selector", "dimension": "geo_region", "value": "CA" },
|
||||||
|
"intervals":["2012-10-01T00:00/2020-01-01T00"]
|
||||||
|
}
|
47
examples/bin/examples/webstream/webstream_realtime.spec
Normal file
47
examples/bin/examples/webstream/webstream_realtime.spec
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[{
|
||||||
|
"schema": {
|
||||||
|
"dataSource": "webstream",
|
||||||
|
"aggregators": [
|
||||||
|
{"type": "count", "name": "rows"},
|
||||||
|
{"type": "doubleSum", "fieldName": "known_users", "name": "known_users"}
|
||||||
|
],
|
||||||
|
"indexGranularity": "minute",
|
||||||
|
"shardSpec": {"type": "none"}
|
||||||
|
},
|
||||||
|
|
||||||
|
"config": {
|
||||||
|
"maxRowsInMemory": 50000,
|
||||||
|
"intermediatePersistPeriod": "PT2m"
|
||||||
|
},
|
||||||
|
|
||||||
|
"firehose": {
|
||||||
|
"type": "webstream",
|
||||||
|
"url":"http://developer.usa.gov/1usagov",
|
||||||
|
"renamedDimensions": {
|
||||||
|
"g":"bitly_hash",
|
||||||
|
"c":"country",
|
||||||
|
"a":"user",
|
||||||
|
"cy":"city",
|
||||||
|
"l":"encoding_user_login",
|
||||||
|
"hh":"short_url",
|
||||||
|
"hc":"timestamp_hash",
|
||||||
|
"h":"user_bitly_hash",
|
||||||
|
"u":"url",
|
||||||
|
"tz":"timezone",
|
||||||
|
"t":"time",
|
||||||
|
"r":"referring_url",
|
||||||
|
"gr":"geo_region",
|
||||||
|
"nk":"known_users",
|
||||||
|
"al":"accept_language"
|
||||||
|
},
|
||||||
|
"timeDimension":"t",
|
||||||
|
"timeFormat":"posix"
|
||||||
|
},
|
||||||
|
|
||||||
|
"plumber": {
|
||||||
|
"type": "realtime",
|
||||||
|
"windowPeriod": "PT3m",
|
||||||
|
"segmentGranularity": "hour",
|
||||||
|
"basePersistDirectory": "/tmp/example/usagov_realtime/basePersist"
|
||||||
|
}
|
||||||
|
}]
|
Loading…
x
Reference in New Issue
Block a user