mirror of https://github.com/apache/druid.git
74 lines
2.0 KiB
JSON
74 lines
2.0 KiB
JSON
{
|
|
"type" : "index",
|
|
"spec" : {
|
|
"dataSchema" : {
|
|
"dataSource" : "transform-tutorial",
|
|
"parser" : {
|
|
"type" : "string",
|
|
"parseSpec" : {
|
|
"format" : "json",
|
|
"dimensionsSpec" : {
|
|
"dimensions" : [
|
|
"animal",
|
|
{ "name": "location", "type": "long" }
|
|
]
|
|
},
|
|
"timestampSpec": {
|
|
"column": "timestamp",
|
|
"format": "iso"
|
|
}
|
|
}
|
|
},
|
|
"metricsSpec" : [
|
|
{ "type" : "count", "name" : "count" },
|
|
{ "type" : "longSum", "name" : "number", "fieldName" : "number" },
|
|
{ "type" : "longSum", "name" : "triple-number", "fieldName" : "triple-number" }
|
|
],
|
|
"granularitySpec" : {
|
|
"type" : "uniform",
|
|
"segmentGranularity" : "week",
|
|
"queryGranularity" : "minute",
|
|
"intervals" : ["2018-01-01/2018-01-03"],
|
|
"rollup" : true
|
|
},
|
|
"transformSpec": {
|
|
"transforms": [
|
|
{
|
|
"type": "expression",
|
|
"name": "animal",
|
|
"expression": "concat('super-', animal)"
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"name": "triple-number",
|
|
"expression": "number * 3"
|
|
}
|
|
],
|
|
"filter": {
|
|
"type":"or",
|
|
"fields": [
|
|
{ "type": "selector", "dimension": "animal", "value": "super-mongoose" },
|
|
{ "type": "selector", "dimension": "triple-number", "value": "300" },
|
|
{ "type": "selector", "dimension": "location", "value": "3" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"ioConfig" : {
|
|
"type" : "index",
|
|
"firehose" : {
|
|
"type" : "local",
|
|
"baseDir" : "quickstart/tutorial",
|
|
"filter" : "transform-data.json"
|
|
},
|
|
"appendToExisting" : false
|
|
},
|
|
"tuningConfig" : {
|
|
"type" : "index",
|
|
"maxRowsPerSegment" : 5000000,
|
|
"maxRowsInMemory" : 25000,
|
|
"forceExtendableShardSpecs" : true
|
|
}
|
|
}
|
|
}
|