Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Beeline authorization failed with user name with "-" such as ambari-qa

avatar
Expert Contributor

How to grant a user with "-" in its user name such as 'ambari-qa'?

0: jdbc:hive2://> show grant user ambari-qa in ALL;

Error: Error while compiling statement: FAILED: ParseException line 1:22 missing EOF at '-' near 'ambari' (state=42000,code=40000)

0: jdbc:hive2://> show grant user ambari\\-qa in ALL;

Error: Error while compiling statement: FAILED: ParseException line 1:22 character '\' not supported here line 1:23 character '\' not supported here (state=42000,code=40000)

1 ACCEPTED SOLUTION

avatar
Super Guru
@wayne2chicagoPlease try below command. Instead of "in" it should be "on" and for username we only need to put back quote.

hive> show grant user `ambari-qa` on ALL;

View solution in original post

2 REPLIES 2

avatar
Super Guru
@wayne2chicagoPlease try below command. Instead of "in" it should be "on" and for username we only need to put back quote.

hive> show grant user `ambari-qa` on ALL;

avatar
Expert Contributor

Thanks. back tick works.