Hive does not support '-' as a database name, which pattern is "[\\w_]+",
so you can use '_' instead

On Tue, Nov 1, 2011 at 9:29 AM, Sriram Krishnan <skrish...@netflix.com>wrote:

> Hi,
>
> Does anyone know how to handle hyphens in any of the following?
> Specifically, we have a user with a hyphenated username – and I can't
> figure out a way to add him to a certain role. No amount of escaping my
> hyphen seems to help. I am using Hive version 0.7.1.
>
> Any ideas would be appreciated.
>
> Thanks,
> Sriram
>
> hive> create database if not exists sri-krish;
> FAILED: Parse Error: line 1:33 mismatched input '-' expecting EOF near
> 'sri'
>
> hive> grant all on database default to user sri-krish;
> FAILED: Parse Error: line 1:41 mismatched input '-' expecting EOF near
> 'sri'
>
>


-- 
Thanks,
Jander

Reply via email to