Monday, May 11, 2015

chapte 04 : type of tables in hive

Types of table in hive
  1. Managed Table

    these are defualt table of hive which are managed by warehouse system.
    Managed tabular data will get stored in ware house.

    HDFS PATH : /user/hive/warehouse/<<tablename>>/tabledata
    How to create managed table 

    Syntax : Create table <<tablename>> <schema def>>
    row format delimited
    fields terminated by '|'
    lines terminated by '\n'
    stored as filename; 

    There are two way to load the data 

    1. local path (load data local inpath  'local path' into table tablename )
    2. HDFS path (load data  inpath 'HDFS PATH' into table tablename)

    Once the data loaded from any way it will be a part of HDFS only

    /user/hive/warehouse



No comments:

Post a Comment