Hive data model management
Hive handles data in the following four ways:
- Hive tables
- Hive table partition
- Hive partition bucketing
- Hive views
We will see each one of them in detail in the following sections.
Hive tables
A Hive table is very similar to any RDBMS table. The table is divided into rows and columns. Each column (field) is defined with a proper name and datatype. We have already seen all the available datatypes in Hive in the Supported datatypes section. A Hive table is divided into two types:
- Managed tables
- External tables
We will learn about both of these types in the following sections.
Managed tables
The following is a sample command to define a Hive managed table:
Create Table < managed_table_name> Column1 <data type>, Column2 <data type>, Column3 <data type> Row format delimited Fields Terminated by "t";
When the preceding query is executed, Hive creates the table and the metadata is updated in the metastore accordingly. But the table is empty. So...