As of now we have seen Hive Introduction. We know that HIVE is used to pose queries on the processed data. Generally in RDBMS we pose queries on Tables. Hive also stores the data in the form of Tables, these tables are stored on HDFS. The following are the two types of tables in HIVE.
- Managed Tables
- External Tables
Hive also stores the metadata of these tables in Hive Metastore. In this post let us see in detail about how to create a table, and how to import data into them.
Managed Tables:
As the name implies, these tables are managed by Hive Warehouse system. All the Managed tables will be stored in the sub-directories of Hive Warehouse directory. The following is the command tothe Managed Tables.
Managed Table Creation |
The following is the example of Managed tables:
Managed table example |
External Tables:
As the name implies these are not managed by Warehouse. All the external tabular data is stored in the location specified in the at the time of creation. The following is the syntax to create the External tables.External Table Syntax |
External Table Example |