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 in Big Data Hadoop by Suman
30 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 by Yash

Related Questions In Big Data Hadoop

0 votes
1 answer

How to change the location of a table in hive?

Hey, Basically When we create a table in hive, ...READ MORE

answered May 14 in Big Data Hadoop by Gitika
• 25,300 points
107 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 in Big Data Hadoop by Gitika
• 25,300 points

edited Jun 26 by Gitika 27 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,290 points
1,244 views
0 votes
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,490 points
2,306 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,490 points
237 views
0 votes
10 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
11,899 views
0 votes
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,240 points
880 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 in Big Data Hadoop by Gitika
• 25,300 points
85 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 in Big Data Hadoop by Gitika
• 25,300 points
34 views