Database Reference
In-Depth Information
guageManual + UDF#LanguageManualUDF-Built-inTable-Generat-
ingFunctions(UDTF) .
Hive Tables
Hive provides the mechanism for creating two types of tables:
Hive-managed table
Hive external table
With Hive-managed tables, Hive is responsible for managing the table's metadata
and actual data. Dropping such data would result in data drop as well. Whereas with an
external table it will not be managed by Hive, and any drop table activity will not result
in data drop. We will explore more about these types of tables in coming exercises.
Local FS Data Loading
In this section, we will discuss more about Hive DDL/DML operations. In this first ex-
ercise, we will create a simple schema in Hive and load data from the local file system.
1.
First, let's create a database:
create database employee_store;
2.
Next, create a table as follows:
use employee_store;
create table employee(person_id string, fname
string) row format delimited fields
terminated by ',';
Here, with a table DDL operation we have defined that fields are de-
limited by ',' .
3.
We can load data from the local file system as follows:
Search WWH ::




Custom Search