`

Hive: Data types and File formats

    博客分类:
  • Hive
 
阅读更多

Primative types:

TINYINT    SMALLINT  INT  BIGINT  BOOLEAN  FLOAT  DOUBLE STRING  TIMESTAMP  BINARY

 

Collection Data Types:

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:


 you can overwrite the formats in declare a table:



 Hive is Schema on Read while traditional database Schema on Write.

 



 

 

Reference

<<programming in Pig>>

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

  • 大小: 43.2 KB
  • 大小: 68.3 KB
  • 大小: 39.5 KB
  • 大小: 55.1 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics