Hive SET LOCATION command not changing the location of the database

0 votes

Hi. I am facing some problems with Hive. I want to change the location of a database in Hive and for that I am using the SET LOCATION command as follows:

ALTER DATABASE employee SET LOCATION <hdfs_path>;

But the location of this database is still the same. I did not get any errors so I am assuming that the command worked fine but I don't see the change reflecting. 

May 20, 2019 in Big Data Hadoop by Suman
3,370 views

1 answer to this question.

0 votes
The SET LOCATION command does not change the location of the existing tables or partitions. No metadata of the existing tables or partitions are changed. What SET LOCATION does is, it changes the parent directory of the Hive database and all the new data is stored in the newly mentioned location.
answered May 20, 2019 by Yash

Related Questions In Big Data Hadoop

0 votes
2 answers

How to change the location of a table in hive?

Changing location requires 2 steps: 1.) Change location ...READ MORE

answered Feb 12, 2020 in Big Data Hadoop by Saksham Sehrawet
9,070 views
0 votes
1 answer

Command to see the indexes of a table in Hive?

Hey, The command you can use to see ...READ MORE

answered Jun 26, 2019 in Big Data Hadoop by Gitika
• 65,770 points

edited Jun 26, 2019 by Gitika 6,011 views
0 votes
1 answer

Best way of starting & stopping the Hadoop daemons with command line

First way is to use start-all.sh & ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
10,065 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,028 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,535 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,830 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,611 views
0 votes
1 answer

What is the command to know the details of your data created in a table in Hive?

Hey, Yes, there is a way to check ...READ MORE

answered May 15, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,485 views
0 votes
1 answer

List of all the functions that can be obtain from hive?

Hello, A list of all functions can be ...READ MORE

answered May 16, 2019 in Big Data Hadoop by Gitika
• 65,770 points
965 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP