Altering the view properties

In this recipe, you will learn how to alter the view properties in Hive.

Getting ready

This command is used to alter the view properties, the same as in the case of tables. The general syntax for altering a view is as follows:

ALTER VIEW view_name SET TBLPROPERTIES table_properties;

Where:

table_properties is defined as : (property_name = property_value, property_name = property_value, ...)

How to do it…

Follow these steps to alter the view properties in Hive. The following statement changes the old comment to a new one:

Alter View Hive_view SET TBLPROPERTIES ('comment' = 'This is a new comment');

Get Apache Hive Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.