# 1 打开postman,请求地址设置为 http://server1:8090/druid/indexer/v1/task
# 2 请求方式选择为POST
# 3 body > raw > JSON(application/json)
# 4 將下屬index_order.json放在請求參數中
# 5 postman 发送請求
# index_order.json
{
"spec": {
"dataSchema": {
"dataSource": "demo_order",
"parser": {
"type": "String",
"parseSpec": {
"format": "json",
"dimensionsSpec": {
"dimensions": [
"category",
"areaName"
]
},
"timestampSpec": {
"column": "timestamp",
"format": "auto"
}
}
},
"metricsSpec": [
{
"type": "count",
"name": "count"
},
{
"type": "longSum",
"name": "money",
"fieldName": "money",
"expression": null
}
],
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "DAY",
"queryGranularity": "HOUR",
"rollup": true,
"intervals": [
"2022-05-06T00:00:00.000Z/2022-05-09T00:00:00.000Z"
]
},
"transformSpec": {
"filter": null,
"transforms": []
}
},
"ioConfig": {
"type": "index",