Hive data storage,data types and functions:
Hive data storage:
Hive data is organized into:
Hive supports primitive and complex data types,
1)Primitive Types:
2)Complex Types:
Hive Built In Operators and Functions:
*DESCRIBE FUNCTION <name_of_fuction>:
*DESCRIBE FUNCTION EXTENDED <name_of_function>;
Previous Page Next page
Hive data storage:
Hive data is organized into:
- Databases:Metastore of table
- Tables: resides on HDFS
- Partitions: Each Table can have one or more partition Keys which determines how the data is stored.
- Buckets (or Clusters):Data in each partition may in turn be divided into Buckets based on the value of a hash function of some column of the Table.
Hive supports primitive and complex data types,
1)Primitive Types:
- Integers
TINYINT—1 byte integer
SMALLINT—2 byte integer
INT—4 byte integer
BIGINT—8 byte integer
- Boolean type
BOOLEAN—TRUE/FALSE
- Floating point numbers
FLOAT—single precision
DOUBLE—Double precision
- Fixed point numbers
DECIMAL—a fixed point value of user defined scale and precision
- String types
- STRING—sequence of characters in a specified character set
- VARCHAR—sequence of characters in a specified character set with a maximum length
- CHAR—sequence of characters in a specified character set with a defined length
- Date and time types
TIMESTAMP— a specific point in time, up to nanosecond precision
DATE—a date
- Binary types
BINARY—a sequence of bytes
2)Complex Types:
arrays: ARRAY<data_type>
maps: MAP<primitive_type, data_type>
structs: STRUCT<col_name : data_type [COMMENT col_comment], ...>
union: UNIONTYPE<data_type, data_type, ...>
Hive Built In Operators and Functions:
In Hive CLI, use these commands to see the latest documentation:
SHOW FUNCTIONS;*SHOW FUCNTIONS:
DESCRIBE FUNCTION <function_name>;
DESCRIBE FUNCTION EXTENDED <function_name>;
*DESCRIBE FUNCTION <name_of_fuction>:
*DESCRIBE FUNCTION EXTENDED <name_of_function>;
Previous Page Next page
Awesome blog :-)
ReplyDelete