@
arsgm ```json
{
"type" : "index",
"spec" : {
"dataSchema" : {
"dataSource" : "order",
"parser" : {
"type" : "string",
"parseSpec" : {
"format" : "csv",
"columns":["time","user_id","r","f","m"],
"dimensionsSpec" : {
"dimensions" : [{"type":"long","name":"user_id"}
]
},
"timestampSpec" : {
"format" : "auto",
"column" : "time"
}
}
},
"metricsSpec" : [
{ "type" : "count", "name" : "count", "type" : "count" },
{ "type" : "longSum", "name" : "r", "fieldName" : "r" },
{ "type" : "longSum", "name" : "f", "fieldName" : "f" },
{ "type" : "longSum", "name" : "m", "fieldName" : "m" }
],
"granularitySpec" : {
"type" : "uniform",
"segmentGranularity" : "day",
"queryGranularity" : "none",
"intervals": ["2015-09-01/2015-09-02"]
}
},
"ioConfig" : {
"type" : "index",
"firehose" : {
"type" : "local",
"baseDir" : "quickstart/",
"filter" : "rfm_data_after.csv"
},
"appendToExisting" : false
},
"tuningConfig" : {
"type" : "index",
"targetPartitionSize" : 5000000,
"maxRowsInMemory" : 25000,
"forceExtendableShardSpecs" : true
}
}
}
```
数据示例:
```
2015-09-01T01:30:00Z6,40,51,78.84019607843138
2015-09-01T01:30:00Z12,20,28,48.86678571428571
2015-09-01T01:30:00Z18,335,1,19.9
2015-09-01T01:30:00Z30,2,2,114.2
```
URL:
```
curl -X 'POST' -H 'Content-Type:application/json' -d @
order-task.json localhost:8090/druid/indexer/v1/task
```
导入不进去数据是怎么回事????