Hi Ahmad, Could you please clarify, which version (and vendor) of Hive and Drill you are using?
Apache Drill 1.16 works fine with hive 2.3.2. There are possible some issues for other versions of Hive, so it is highly recommended to use this specific version. Kind regards, Volodymyr Vysotskyi On Tue, May 28, 2019 at 8:07 PM Ahmad, Sami <[email protected]> wrote: > Any updates/advise on this please? > I really need to demo this apache drill to management . > > regards > > -----Original Message----- > From: Ahmad, Sami > Sent: Monday, May 27, 2019 11:19 AM > To: [email protected] > Cc: Khurram Faraaz <[email protected]> > Subject: RE: cant select from hive table > > None of the three worked > > apache drill (hive.default)> use hive.`default`; > +------+------------------------------------------+ > | ok | summary | > +------+------------------------------------------+ > | true | Default schema changed to [hive.default] | > +------+------------------------------------------+ > 1 row selected (0.086 seconds) > apache drill (hive.default)> select * from test; > Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 18: > Object 'test' not found > > > [Error Id: f4154d1a-59c3-4204-8186-67dcfaddf401 ] (state=,code=0) apache > drill (hive.default)> apache drill (hive.default)> apache drill > (hive.default)> !q > Closing: org.apache.drill.jdbc.impl.DrillConnectionImpl > [root@hadoop1 bin]# sqlline -u jdbc:drill:zk=hadoop1:2181 Apache Drill > 1.16.0 "Think different, think Drill." > apache drill> select * from hive.`test`; > Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 18: > Object 'test' not found within 'hive' > > > [Error Id: 65a8acce-19b4-47f3-babb-ca1dc8c80ce9 ] (state=,code=0) apache > drill> apache drill> use hive; > +------+----------------------------------+ > | ok | summary | > +------+----------------------------------+ > | true | Default schema changed to [hive] | > +------+----------------------------------+ > 1 row selected (0.088 seconds) > apache drill (hive)> select * from test; > Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 18: > Object 'test' not found > > > [Error Id: ebf13f9c-16c9-4990-b72a-ba74e8348753 ] (state=,code=0) > > -----Original Message----- > From: Igor Guzenko [mailto:[email protected]] > Sent: Monday, May 27, 2019 11:02 AM > To: [email protected] > Cc: Khurram Faraaz <[email protected]> > Subject: Re: cant select from hive table > > Hello Khurram, > > If Hive storage based authorization is enabled for your deployment it's > may be the reason why you're getting such messages. > In the test it's visible that when at storage level user don't have rights > to query table files Drill shows the confusing error. Here is the test > > https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fdrill%2Fblob%2Fmaster%2Fcontrib%2Fstorage-hive%2Fcore%2Fsrc%2Ftest%2Fjava%2Forg%2Fapache%2Fdrill%2Fexec%2Fimpersonation%2Fhive%2FTestStorageBasedHiveAuthorization.java&data=02%7C01%7CSami.Ahmad%40dot.state.fl.us%7C913283ea621c44fa549508d6e2b46364%7Cdb21de5dbc9c420c8f3f8f08f85b5ada%7C0%7C1%7C636945661720971215&sdata=41utoQOJI01U0Dvc6bDZDLBL6UpoQHCr6sXK3AtWzCc%3D&reserved=0 > . > > If I didn't guess and security isn't enabled, then you could just try: > > 1) Two separate queries: > use hive.`default`; > select * from test; > > OR > > 2) From root schema > select * from hive.`test`; > > OR > > 3) Two separate queries: > use hive; > select * from test; > > If previous queries don't work for not secured deployment it's a bug. > > Thanks, Igor > > On Mon, May 27, 2019 at 3:27 PM Ahmad, Sami <[email protected]> > wrote: > > > > Still not working : > > > > apache drill> use hive.`default`; > > +------+------------------------------------------+ > > | ok | summary | > > +------+------------------------------------------+ > > | true | Default schema changed to [hive.default] | > > +------+------------------------------------------+ > > 1 row selected (0.089 seconds) > > apache drill (hive.default)> show tables; > > +--------------+------------+ > > | TABLE_SCHEMA | TABLE_NAME | > > +--------------+------------+ > > | hive.default | test | > > +--------------+------------+ > > 1 row selected (0.188 seconds) > > apache drill (hive.default)> select * from hive.`default`.test; > > Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 18: > Object 'test' not found within 'hive.default' > > > > > > [Error Id: 6b24df4c-3678-4bf4-94eb-8dd5d9910213 ] (state=,code=0) > > apache drill (hive.default)> > > > > -----Original Message----- > > From: Arina Yelchiyeva [mailto:[email protected]] > > Sent: Friday, May 24, 2019 4:34 PM > > To: [email protected] > > Cc: Khurram Faraaz <[email protected]> > > Subject: Re: cant select from hive table > > > > EXTERNAL SENDER: Use caution with links and attachments. > > > > > > Default is keyword, use it back-ticks (select * from > hive.`default`.test). > > > > > On May 24, 2019, at 10:59 PM, Ahmad, Sami <[email protected]> > 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 <[email protected]>; [email protected] > > > 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)> >
