美文网首页
一个更加复杂的实例

一个更加复杂的实例

作者: tonyemail_st | 来源:发表于2017-09-29 21:38 被阅读0次

    创建表

    hive> create table sgr(qtime string, qid string, qword string, url string) row format delimited fields terminated by ',';
    hive> desc sgr;
    OK
    qtime                   string                                      
    qid                     string                                      
    qword                   string                                      
    url                     string                                      
    Time taken: 0.086 seconds, Fetched: 4 row(s)
    

    加载数据

    hive> load data inpath '/sougou.dic' into table sgr;
    

    热搜榜

    hive>create table sgr_results as select keyword, count(1) as count from (select qword as keyword from sgr) t group by keyword order by count desc;
    

    查询结果

    hive> select * from sgr_results limit 10;
    

    相关文章

      网友评论

          本文标题:一个更加复杂的实例

          本文链接:https://www.haomeiwen.com/subject/fphwextx.html