Hive: Data types and File formats

Primative types:

TINYINT    SMALLINT  INT  BIGINT  BOOLEAN  FLOAT  DOUBLE STRING  TIMESTAMP  BINARY

 

Collection Data Types:

Hive: Data types and File formats_第1张图片

Example:

CREATE TABLE employees (
name                      STRING,
salary                      FLOAT,
subordinates           ARRAY<STRING>,
deductions              MAP<STRING, FLOAT>,
address                  STRUCT<street:STRING, city:STRING, state:STRING, zip:INT>);

File formats:

Hive: Data types and File formats_第2张图片
 you can overwrite the formats in declare a table:


Hive: Data types and File formats_第3张图片
 Hive is Schema on Read while traditional database Schema on Write.

 


Hive: Data types and File formats_第4张图片
 

 

Reference

<<programming in Pig>>

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types

你可能感兴趣的:(format)