Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Open the Hive Shell: Open the Hive shell so you can manually create a Hive table by entering 'hive' at the command line.
  2. Create the Table in Hive: You need a hive table to load the data to, so enter the following in the hive shell.
    Code Block
    sql
    sql
    create table weblogs_agg (
        client_ip    string,
        year    string,
        month    string,
        month_num    int,
        pageviews    bigint
    )
    row format delimited
    fields terminated by '\t';
    
  3. Close the Hive Shell: You are done with the Hive Shell for now, so close it by entering 'quit;' in the Hive Shell.
  4. Load the Table: Load the Hive table by running the following commands:
    Code Block
    hadoop fs -put weblog_hive.txt /user/hive/warehouse/weblogs_agg/
    
    

...