Default is keyword, use it back-ticks (select * from hive.`default`.test).

> On May 24, 2019, at 10:59 PM, Ahmad, Sami <sami.ah...@dot.state.fl.us> wrote:
> 
> As you can see , the show table command sees the table but select command 
> cant find it .
> 
> pache drill (hive.default)> show tables;
> +--------------+------------+
> | TABLE_SCHEMA | TABLE_NAME |
> +--------------+------------+
> | hive.default | test       |
> +--------------+------------+
> 1 row selected (0.113 seconds)
> apache drill (hive.default)> select id from test;
> Error: VALIDATION ERROR: From line 1, column 16 to line 1, column 19: Object 
> 'test' not found
> 
> 
> [Error Id: 7d0eb107-38c6-4d37-90b2-baa953a3e701 ] (state=,code=0)
> apache drill (hive.default)>
> 
> From: Ahmad, Sami
> Sent: Friday, May 24, 2019 11:35 AM
> To: Khurram Faraaz <kfar...@mapr.com>; user@drill.apache.org
> Subject: cant select from hive table
> 
> Hi
> My hive storage plugin is working and I can see the hive tables  but I can’t 
> select from them ,please advise
> 
> apache drill (hive.default)> show tables;
> +--------------+------------+
> | TABLE_SCHEMA | TABLE_NAME |
> +--------------+------------+
> | hive.default | test       |
> +--------------+------------+
> 1 row selected (0.126 seconds)
> apache drill (hive.default)> select id from hive.default.`test`;
> Error: PARSE ERROR: Encountered ". default" at line 1, column 20.
> Was expecting one of:
>    <EOF>
>    "ORDER" ...
>    "LIMIT" ...
>    "OFFSET" ...
>    "FETCH" ...
>    "NATURAL" ...
>    "JOIN" ...
>    "INNER" ...
>    "LEFT" ...
>    "RIGHT" ...
>    "FULL" ...
>    "CROSS" ...
>    "," ...
>    "OUTER" ...
>    "(" ...
>    "MATCH_RECOGNIZE" ...
>    "." ...
>    <IDENTIFIER> ...
>    <QUOTED_IDENTIFIER> ...
>    <BACK_QUOTED_IDENTIFIER> ...
>    <BRACKET_QUOTED_IDENTIFIER> ...
>    <UNICODE_QUOTED_IDENTIFIER> ...
>    "TABLESAMPLE" ...
>    "WHERE" ...
>    "GROUP" ...
>    "HAVING" ...
>    "WINDOW" ...
>    "UNION" ...
>    "INTERSECT" ...
>    "EXCEPT" ...
>    "MINUS" ...
>    "." <IDENTIFIER> ...
>    "." <QUOTED_IDENTIFIER> ...
>    "." <BACK_QUOTED_IDENTIFIER> ...
>    "." <BRACKET_QUOTED_IDENTIFIER> ...
>    "." <UNICODE_QUOTED_IDENTIFIER> ...
>    "." "*" ...
>    "[" ...
> 
> 
> SQL Query select id from hive.default.`test`
>                   ^
> 
> 
> [Error Id: 96ad1704-8b95-42b7-913c-b62d3d2c5782 ] (state=,code=0)
> apache drill (hive.default)>

Reply via email to