Getting Error while loading custom JSON data in Druid


I am new to Druid, so I was just trying out druid and loading my own custom data. But, while doing so I was getting following error:

$ curl -X ‘POST’ -H ‘Content-Type:application/json’ -d @quickstart/tweets.json localhost:8090/druid/indexer/v1/task

{“error”:"Unexpected token (END_OBJECT), expected FIELD_NAME: missing property ‘type’ that is to contain type id (for class io.druid.indexing.common.task.Task)\n at [Source: HttpInputOverHTTP@4c033c69; line

Can someone help in understanding the issue ?



This error tells me that your tweets.json file is wrong along the lines of metricSpec definition.
Did you take a look at the wikiticker example in druid quickstart? MetricSpec has metric dictionary containing type, name and fieldName.
Here’s the documentation on how to write an ingestion spec -

Hope this helps.