DEFINING TABLE RECORD FORMATS IN HIVE
来源:互联网 发布:zeppelin 修改端口 编辑:程序博客网 时间:2024/06/05 14:58
LazySimpleSerDe: The default SerDe that’s used with the TEXTFILE format; it would be used with our_first_table from the following listing.
(A) $ $HIVE_HOME/bin hive --service cli(B) hive> set hive.cli.print.current.db=true;(C) hive (default)> CREATE DATABASE ourfirstdatabase;OKTime taken: 3.756 seconds(D) hive (default)> USE ourfirstdatabase;OKTime taken: 0.039 seconds(E) hive (ourfirstdatabase)> CREATE TABLE our_first_table ( > FirstName STRING, > LastName STRING, > EmployeeId INT);OKTime taken: 0.043 secondshive (ourfirstdatabase)> quit;(F) $ ls /home/biadmin/Hive/warehouse/ourfirstdatabase.dbour_first_table
It also would be used with data_types_table from the following listing.
$ ./hive --service clihive> CREATE DATABASE data_types_db;OKTime taken: 0.119 secondshive> USE data_types_db;OKTime taken: 0.018 seconds(1)Hive> CREATE TABLE data_types_table ((2) > our_tinyint TINYINT COMMENT '1 byte signed integer',(3) > our_smallint SMALLINT COMMENT '2 byte signed integer',(4) > our_int INT COMMENT '4 byte signed integer',(5) > our_bigint BIGINT COMMENT '8 byte signed integer',(6) > our_float FLOAT COMMENT 'Single precision floating point',(7) > our_double DOUBLE COMMENT 'Double precision floating point',(8) > our_decimal DECIMAL COMMENT 'Precise decimal type based(9) > on Java BigDecimal Object',(10) > our_timestamp TIMESTAMP COMMENT 'YYYY-MM-DD HH:MM:SS.fffffffff"(11) > (9 decimal place precision)',(12) > our_boolean BOOLEAN COMMENT 'TRUE or FALSE boolean data type',(13) > our_string STRING COMMENT 'Character String data type',(14) > our_binary BINARY COMMENT 'Data Type for Storing arbitrary(15) > number of bytes',(16) > our_array ARRAY<TINYINT> COMMENT 'A collection of fields all of(17) > the same data type indexed BY(18) > an integer',(19) > our_map MAP<STRING,INT> COMMENT 'A Collection of Key,Value Pairs(20) > where the Key is a Primitive(21) > Type and the Value can be(22) > anything. The chosen data(23) > types for the keys and values(24) > must remain the same per map',(25) > our_struct STRUCT<first : SMALLINT, second : FLOAT, third : STRING>(26) > COMMENT 'A nested complex data(27) > structure',(28) > our_union UNIONTYPE<INT,FLOAT,STRING>(29) > COMMENT 'A Complex Data Type that can(30) > hold One of its Possible Data(31) > Types at Once')(32) > COMMENT 'Table illustrating all Apache Hive data types'(33) > ROW FORMAT DELIMITED(34) > FIELDS TERMINATED BY ','(35) > COLLECTION ITEMS TERMINATED BY '|'(36) > MAP KEYS TERMINATED BY '^'(37) > LINES TERMINATED BY 'n'(38) > STORED AS TEXTFILE(39) > TBLPROPERTIES ('creator'='Bruce Brown', 'created_at'='Sat Sep 21 20:46:32 EDT 2013');OKTime taken: 0.886 seconds
ColumnarSerDe: Used with the RCFILE format.
RegexSerDe: The regular expression SerDe, which ships with Hive to enable the parsing of text files, RegexSerDe can form a powerful approach for building structured data in Hive tables from unstructured blogs, semi-structured log files, e-mails, tweets, and other data from social media. Regular expressions allow you to extract meaningful information (an e-mail address, for example) with HiveQL from an unstructured or semi-structured text document incompatible with traditional SQL and RDBMSs.
HBaseSerDe: Included with Hive to enables it to integrate with HBase. You can store Hive tables in HBase by leveraging this SerDe.
JSONSerDe: A third-party SerDe for reading and writing JSON data records with Hive. You can quickly find (via Google and GitHub) two JSON SerDes by searching online for the phrase json serde for hive.
AvroSerDe: Included with Hive so that you can read and write Avro data in Hive tables.
- DEFINING TABLE RECORD FORMATS IN HIVE
- rocksdb table formats
- JPA Many To Many Duplicate record in join table
- MySQL—— Insert record if not exists in table
- Data formats in jpeglib
- HIVE Row Formats&SerDe(五)
- hive expecting Identifier near 'table' in table name 报错
- record-mr-hive
- Defining a Business Add-In
- Defining global constant in C++
- %type %rowtype record table
- MIME Formats in IIS5.0
- MIME Formats in IIS5.0
- Compressed Texture Formats in Metal
- The table of Multimedia Compression Formats
- MySQL+VBB问题:Record has changed since last read in table 'session' 的解决
- yii提示The table "xxx" for active record class "DistAR" cannot be found in the database
- Hive-table
- Winform程序打包部署
- CentOS 6.5下 FastDFS结合Nginx插件实现图片http访问
- php算法
- 关于.NET编译的目标平台(AnyCPU,x86,x64)
- C++ 优缺点之我见
- DEFINING TABLE RECORD FORMATS IN HIVE
- 四、swift3.0函数的使用
- Android中判断网络是否连接(可用),不可用跳转设置网络连接
- Matlab学习笔记(5)——classify函数实现线性判别分析
- 计算一组向量相似度
- 接口形式实例化-匿名内部类
- [PAT]1015. Reversible Primes (20)@Java
- XML创建Fragment
- Java生成和操作Excel文件