How to change the location of a table in hive

0 votes

Hi,

I am working on hive and after creating a table its showing the location is default. Can anyone tell me that how to change the table location in hive?

May 14, 2019 in Big Data Hadoop by sunny
9,136 views

2 answers to this question.

0 votes

Hey,

Basically When we create a table in hive, it creates in the default location of the hive warehouse. After creating the table you can move the data from hive table to HDFS with the help of this command:

And you can check the table you have created in HDFS with the help of this command:

answered May 15, 2019 by Gitika
• 65,770 points
0 votes
Changing location requires 2 steps:

1.) Change location in the table properties using the following query
 ALTER TABLE table_name SET LOCATION "location_in_hdfs" (e.g  "hdfs://bighdpope/data/raw/cag/Output")

2.) Copy the file from old_location to new_location using the File Browser.
answered Feb 12, 2020 by Saksham Sehrawet

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop Hive: How to skip the first line of csv while loading in hive table?

You can try this: CREATE TABLE temp ...READ MORE

answered Nov 8, 2018 in Big Data Hadoop by Omkar
• 69,220 points
9,000 views
0 votes
1 answer

Hive: How to know the path of a created table?

You can use the DESCRIBE command to ...READ MORE

answered Nov 28, 2018 in Big Data Hadoop by Omkar
• 69,220 points
3,300 views
+1 vote
1 answer

How to limit the number of rows per each item in a Hive QL?

SELECT a_id, b, c, count(*) as sumrequests FROM ...READ MORE

answered Dec 1, 2018 in Big Data Hadoop by Omkar
• 69,220 points
27,092 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,078 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,575 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
109,076 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,643 views
0 votes
1 answer

How to see the content of a table in hive?

Hello, If you want to see the content ...READ MORE

answered May 15, 2019 in Big Data Hadoop by Gitika
• 65,770 points
5,242 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,505 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