Friday 8 September 2017

2)Hive data storage,data types and functions:

Hive data storage,data types and functions:

Hive data storage:

Hive data is organized into:
  1. Databases:Metastore of table
  2. Tables: resides on HDFS
  3. Partitions: Each Table can have one or more partition Keys which determines how the data is stored.
  4. 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 Data Types:

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;
DESCRIBE FUNCTION <function_name>;
DESCRIBE FUNCTION EXTENDED <function_name>;
 *SHOW FUCNTIONS:


*DESCRIBE FUNCTION <name_of_fuction>:


*DESCRIBE FUNCTION EXTENDED <name_of_function>;

                                                                                                                                                                        Previous Page                                                                                                                  Next page

1 comment:

Fundamentals of Python programming

Fundamentals of Python programming: Following below are the fundamental constructs of Python programming: Python Data types Python...