hive修改表字段

修改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)
posted @ 2018-11-28 14:26  大数据-大道至简  阅读(10859)  评论(0编辑  收藏  举报
知识共享许可协议
本作品采用知识共享署名-非商业性使用-禁止演绎 3.0 未本地化版本许可协议进行许可。