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
599 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 in Big Data Hadoop by Saksham Sehrawet
874 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
• 29,690 points

edited Jun 26, 2019 by Gitika 586 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,380 points
3,320 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
• 10,920 points
5,109 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
• 10,920 points
729 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
30,378 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,310 points
1,904 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 14, 2019 in Big Data Hadoop by Gitika
• 29,690 points
323 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
• 29,690 points
91 views