Hive - Adding comments to tables
hive, metadata
Solution
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!");
Problem
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?