针对元数据的修改
修改表名:(多用于数据备份)
alter table A rename to B
修改表注释:
alter table A set tblproperties(‘comment’=‘new comment’)
修改文件分隔符:
alter table A set tblproperties(‘filed.delim’=’$’)
修正表文件格式:
alter table A set fileformat rcfile(修改为rcfile格式)
修改表列的操作
修改列名:
alter table A change old_name new_name string(字段的类型)
添加一列:
alter table A add columns(new_column string)
替换一列:
alter table A replace columns(column string)