There will be certain database objects introduced during deployments and hotfixes. Comments are frequently used to indicate which item is introduced in which deployment. However, this is true for OLTP.
Comments are also necessary to understand why the object was formed and what information it would store. This is applicable to both OLTP and OLAP.
While creating the database, table, and table columns, Apache Hive allows you to add comments. These comments can be left blank if you don’t want to. In this post, we’ll look at how to add table comments if the table is already exists.
Here is the syntax to add comments while creating the table.
ALTER TABLE <tableName> SET TBLPROPERTIES (‘comment’ = ‘Comments here’);
ALTER TABLE EMP SET TBLPROPERTIES (‘Comment’ = ‘This table holds the employee info’);
Hope you find this article helpful.
Please subscribe for more interesting updates.