Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive - Adding comments to tables

Tags:

metadata

hive

When I try to add comments to my Hive table,

ALTER TABLE table1 SET TBLPROPERTIES ('comment' = new_comment);

I get the following error:

FAILED: ParseException line 1:64 mismatched input 'new_comment' expecting StringLiteral near '=' in specifying key/value property

Anyone know how to properly add a comment?

like image 474
maia Avatar asked Dec 03 '13 16:12

maia


1 Answers

The comment needs to be a quoted string. For example, these should work:

ALTER TABLE table1 SET TBLPROPERTIES ('comment' = 'Hello World!');

ALTER TABLE table1 SET TBLPROPERTIES ('comment' = "Hello World!");
like image 82
Ike Walker Avatar answered Nov 17 '22 00:11

Ike Walker