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
8,166 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,910 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,210 points
8,410 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,210 points
2,744 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,210 points
25,862 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
10,560 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,185 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
104,222 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,390 points
4,261 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,910 points
4,644 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,910 points
1,258 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