Hive - 向表添加注释

时间:2013-12-03 16:37:49

标签: hive metadata

当我尝试将注释添加到我的Hive表时,

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

我收到以下错误:

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

任何人都知道如何正确添加评论?

1 个答案:

答案 0 :(得分:8)

评论需要是带引号的字符串。例如,这些应该有效:

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

ALTER TABLE table1 SET TBLPROPERTIES ('comment' = "Hello World!");
相关问题