Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Hive doesn't support special characters in column name


Copy link to this message
-
Hive doesn't support special characters in column name
Hi,
The columns in my Hive table had better include some special characters
like / # -

However, I found Hive doesn't allow it, and doesn't allow using \ as escape
character.
all below query fail

(1)
create table test ( "user\/hive" String);
create table test ( "user\\/hive" String);
create table test ( user\/hive String);
create table test ( user\\/hive String);
create table test ( user/hive String);

(2)
also, although Hive does allow _ in column name, but it doesn't special
character as begging of the column name
this query fail:
create table test ( _user_hive String);
this is OK:
create table test ( "user_hive" String);

any idea?

Thanks,
Johnny
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB