Search

How do change settings within Hive Session?



We can change settings from within a session, too, using the SET command. This is useful for changing Hive or MapReduce job settings for a particular query. For example, the following command ensures buckets are populated according to the table definition.
Shell

hive> SET hive.enforce.bucketing=true; 


To see the current value of any property, use SET with just the property name:

Shell
hive> SET hive.enforce.bucketing;
hive.enforce.bucketing=true



By itself, SET will list all the properties and their values set by Hive. This list will not include Hadoop defaults, unless they have been explicitly overridden in one of the ways covered in the above answer. Use SET -v to list all the properties in the system, including Hadoop defaults.