Where does Hive store files for Hive tables? - Big Data In Real World

Where does Hive store files for Hive tables?

How to get DDL or create script of an existing Hive table?
October 25, 2021
What is an efficient way to check if a Spark DataFrame is empty?
December 29, 2021
How to get DDL or create script of an existing Hive table?
October 25, 2021
What is an efficient way to check if a Spark DataFrame is empty?
December 29, 2021

Hive by default store all the files behind the Hive table under the warehouse directory. But this location can be overridden during table or later when adding data by altering table using the LOCATION attribute.

Hive warehouse location

Check the warehouse directory for files stored in Hive tables. By default the warehouse directory is /user/hive/warehouse but this can be changed.

Check the hive-site.xml file and hive.metastore.warehouse.dir  property for the correct location.

<property>
   <name>hive.metastore.warehouse.dir</name>
   <value>/user/hive/warehouse</value>
</property>

 

Location attribute

Hive stores the files under the warehouse directory by default. But this location can be changed during table creating or when loading files at a later location. So make sure to run describe command on the table to know the location.

0: jdbc:hive2://ms2.hirw.com:2181,wk1.hirw.co> describe formatted employee;

 

Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

Comments are closed.

Where does Hive store files for Hive tables?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X