Unable to query __time? (from hive/druid)

This may be more a hive question…not sure (will ask there as well)

Following the quickstart I have table wikipedia

I have created the table in hive as follows:

CREATE EXTERNAL TABLE wikipedia
STORED BY ‘org.apache.hadoop.hive.druid.DruidStorageHandler’
TBLPROPERTIES (“druid.datasource” = “wikipedia”);

Now i can query the table:

select added,channel,cityname,comment,countryisocode,countryname,deleted,delta,isanonymous,isminor,isnew,isrobot from wikipedia;

works as expected

select count(*) from wikipedia;

works as expected

now if query:

select * from wikipedia;

Fail:

Error: [Cloudera]HiveJDBCDriver Error setting metadata result set: Metadata Result Set Error.
SQLState: HY000
ErrorCode: 500002

if I query

select __time from wikipedia;

Error: [Cloudera]HiveJDBCDriver ERROR processing query/statement. Error Code: 40000, SQL state: TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Error while compiling statement: FAILED: ParseException line 1:14 missing ’ at ‘FROM’ near ‘’:28:27, org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:335, org.apache.hive.service.cli.operation.SQLOperation:prepare:SQLOperation.java:199, org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:262, org.apache.hive.service.cli.operation.Operation:run:Operation.java:247, org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:575, org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementAsync:HiveSessionImpl.java:561, sun.reflect.GeneratedMethodAccessor74:invoke::-1, sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java:43, java.lang.reflect.Method:invoke:Method.java:498, org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:78, org.apache.hive.service.cli.session.HiveSessionProxy:access$000:HiveSessionProxy.java:36, org.apache.hive.service.cli.session.HiveSessionProxy$1:run:HiveSessionProxy.java:63, java.security.AccessController:doPrivileged:AccessController.java:-2, javax.security.auth.Subject:doAs:Subject.java:422, org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1730, org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:59, com.sun.proxy.$Proxy51:executeStatementAsync::-1, org.apache.hive.service.cli.CLIService:executeStatementAsync:CLIService.java:315, org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:566, org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1557, org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1542, org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39, org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39, org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56, org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:286, java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1142, java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:617, java.lang.Thread:run:Thread.java:745, *org.apache.hadoop.hive.ql.parse.ParseException:line 1:14 missing ’ at ‘FROM’ near ‘’:35:8, org.apache.hadoop.hive.ql.parse.ParseDriver:parse:ParseDriver.java:241, org.apache.hadoop.hive.ql.parse.ParseUtils:parse:ParseUtils.java:74, org.apache.hadoop.hive.ql.parse.ParseUtils:parse:ParseUtils.java:67, org.apache.hadoop.hive.ql.Driver:compile:Driver.java:617, org.apache.hadoop.hive.ql.Driver:compileInternal:Driver.java:1869, org.apache.hadoop.hive.ql.Driver:compileAndRespond:Driver.java:1816, org.apache.hadoop.hive.ql.Driver:compileAndRespond:Driver.java:1811, org.apache.hadoop.hive.ql.reexec.ReExecDriver:compileAndRespond:ReExecDriver.java:126, org.apache.hive.service.cli.operation.SQLOperation:prepare:SQLOperation.java:197], sqlState:42000, errorCode:40000, errorMessage:Error while compiling statement: FAILED: ParseException line 1:14 missing ’ at ‘FROM’ near ‘’), Query: SELECT __time FROM wikipedia.
SQLState: HY000
ErrorCode: 500051

can you try Select __time from wikipedia, enclosing __time in quotes ?
See -

https://github.com/apache/hive/blob/38d3b8e199ce32eed13aa245417dc4ac6ae0d7f5/ql/src/test/queries/clientpositive/druid_topn.q#L19

for more sample queries.

Tried that still failing :frowning:

select __time from wikipedia limit 10;

Error: [Cloudera]HiveJDBCDriver Error setting metadata result set: Metadata Result Set Error.
SQLState: HY000
ErrorCode: 500002

works just fine…when doing the query via beeline.

fails when doing it via ‘squirrel’, with driver: com.cloudera.hive.jdbc41.HS2Driver…

progress I guess…