Querying sql

Below is indexing json file which i uploaded and task was success:-

{
“type” : “index”,
“spec” : {
“dataSchema” : {
“dataSource” : “result2”,
“parser” : {
“type” : “string”,
“parseSpec” : {
“format” : “json”,
“dimensionsSpec” : {
“dimensions” : [“time”,“page”,“Language”,“user”,“Unpatrolled”,“newpage”,“Robot”,“Anonymous”,“namespace”,“continent”,“countryName”,“regionName”,
{ “name”: “added”, “type”: “long” },
{ “name”: “deleted”, “type”: “long” },
{ “name”: “delta”, “type”: “long” }
]
},
“timestampSpec”: {

“column”: “time”,
“format”: “iso”
}
}
},
“metricsSpec” : ,
“granularitySpec” : {
“type” : “uniform”,
“segmentGranularity” : “day”,
“queryGranularity” : “none”,
“intervals” : [“2015-11-09/2015-11-09”],
“rollup” : false
}
},
“ioConfig” : {
“type” : “index”,
“firehose” : {
“type” : “local”,
“baseDir” : “quickstart/”,
“filter” : “result2.json”
},
“appendToExisting” : false
},
“tuningConfig” : {
“type” : “index”,
“targetPartitionSize” : 5000000,
“maxRowsInMemory” : 25000,
“forceExtendableShardSpecs” : true
}
}
}

this is my sql for loading test2 json file:-

{
“query”:“SELECT page, COUNT(*) AS Edits FROM test2 WHERE “__time” BETWEEN TIMESTAMP ‘2015-09-11 00:00:00’ AND TIMESTAMP ‘2015-09-12 00:00:00’ GROUP BY page ORDER BY Edits DESC LIMIT 5”

}

It gives below error message:-

{“error”:“Unknown exception”,“errorMessage”:“org.apache.calcite.runtime.CalciteContextException: From line 1, column 37 to line 1, column 46: Object ‘test2’ not found”,“errorClass”:“org.apache.calcite.tools.ValidationException”,“host”:null}

Your datasource name is not test2 its result2

“dataSource” : “result2”,

Hi Pratik ,

Then too its giving the same error message.

Hey Shivendra,

I would make sure that data actually got loaded. Try: SELECT * FROM INFORMATION_SCHEMA.TABLES to see if you did. If not, it’s possible Druid found all your incoming rows to be unparseable or tossed them out for some other reason. The task logs should help sort that out.