Hive internal and external tables
The concept of a table in Hive is very similar to the table in the relational database. Each table associates with a directory configured in ${HIVE_HOME}/conf/hive-site.xml
in HDFS. By default, it is /user/hive/warehouse
in HDFS. For example, /user/hive/warehouse/employee
is created by Hive in HDFS for the employee
table. All the data in the table will be kept in the directory. The Hive table is also referred to as internal or managed tables.
When there is data already in HDFS, an external Hive table can be created to describe the data. It is called EXTERNAL
because the data in the external table is specified in the LOCATION
properties instead of the default warehouse directory. When keeping data in the internal ...
Get Apache Hive Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.