美文网首页
hive-修改hive表字段的注释

hive-修改hive表字段的注释

作者: 香山上的麻雀 | 来源:发表于2020-03-06 17:04 被阅读0次

    修改hive表字段的注释

    修改之前

    hive> desc dw.fct_user_ctag_today;
    OK
    user_id                 int                     用户id                
    user_tag                int                     精准化新老客标签            
    rpt_tag                 int                     报表新老客标签             
    group_rpt_tag           int                     拼团报表用户标签            
    date                    string                                      
    
    # Partition Information          
    # col_name              data_type               comment             
    
    date                    string                                      
    Time taken: 0.04 seconds, Fetched: 10 row(s)
    

    alter table

    hive> use dw;
    hive> alter table fct_user_ctag_today CHANGE COLUMN rpt_tag rpt_tag int comment '1新客,2新转老,3新注册,5老客';
    

    修改之后

    hive> desc dw.fct_user_ctag_today;
    OK
    user_id                 int                     用户id                
    user_tag                int                     精准化新老客标签            
    rpt_tag                 int                     1新客,2新转老,3新注册,5老客   
    group_rpt_tag           int                     拼团报表用户标签            
    date                    string                                      
    
    # Partition Information          
    # col_name              data_type               comment             
    
    date                    string                                      
    Time taken: 0.031 seconds, Fetched: 10 row(s)
    

    本文转载自:https://cloud.tencent.com/developer/article/1403315

    相关文章

      网友评论

          本文标题:hive-修改hive表字段的注释

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