Q&A
Ask and answer questions to make information more available to wider audiences.
Lucas Cestare @lucascastare   14, Jun 2023 12:00 AM
change settings within a Hive session
Can we change the settings within a Hive session?
answers 3
 
Answer 1
Jose Grimsbro @josegrimsbro   21, Jun 2023 12:28 PM
Yes we can change the settings
 
Answer 2
Michaela Samuel @samuelmichaela5   21, Jun 2023 11:10 AM
For example, the following command shows that buckets are occupied according to the table definition:

hive> SET hive.enforce.bucketing=true;

We can see the current value of any property by using SET with the property name. SET will list all the properties with their values set by Hive.

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

This list will not include the defaults of Hadoop. So, we should use the below code:

SET -v

It will list all the properties including the Hadoop defaults in the system.

 
Answer 3
Michaela Samuel @samuelmichaela5   21, Jun 2023 11:08 AM
Yes, we can change the settings within a Hive session using the SET command. It helps change the Hive job settings for an exact query.