hive 常用命令

alter table table_name set TBLPROPERTIES('EXTERNAL'='FALSE');

alter table yum_area_ods.ods_full_city_mapping add columns(taco_city_code string comment 'taco城市code') cascade;

alter table yum_area_ods.ods_full_city_mapping SET SERDEPROPERTIES('serialization.null.format' = '\\N');

msck repair table table_name;


alter table sds.dws_sds_reweight_appeal_count change column appeal_count appeal_count int;


删除重建表步骤:

alter table table_name set TBLPROPERTIES('EXTERNAL'='FALSE');
drop table table_name;

CREATE EXTERNAL TABLE if not exist

 

查看表分区字段类型:

desc table_name partition(inc_day = 20220228)

查看表分区路径:

desc formatted sds.sds_dws_dist_grow_rank_mi partition(inc_month=202202);

posted @ 2022-01-19 16:03  guoyu1  阅读(48)  评论(0)    收藏  举报