1.表结构不变(列名,分区不变),表存储和压缩算法改变
 1.1. 外部表(未分区)
 1.1.1. 拷贝源表结构,创建外部表
 create table if not exists [目标表名] like [源表名]
 示例:
 create table if not exists dwm_soh_estimate_nopartition_out_snappy like dwm_soh_estimate_nopartition_out;
 1.1.2. 创建目标表在HDFS上对应的存储目录
 hdfs dfs -mkdir –p 存储目录
 示例:
 
 
 1.1.3. 修改目标表的location
 ALTER TABLE [目标表名] SET LOCATION [值]
 示例:
 ALTER TABLE dwm_soh_estimate_nopartition_out_snappy SET LOCATION “hdfs://nameservice1/external/snappy/data/dwm.db/dwm_soh_estimate_nopartition_out_snappy”;
 1.1.4. 修改目标表的存储格式和压缩格式
 alter table 表名 set fileformat orc;
 ALTER TABLE 表名 SET FILEFORMAT INPUTFORMAT ‘org.apache.hadoop.hive.ql.io.orc.OrcInputForm







![[附源码]Python计算机毕业设计Django社区住户信息管理系统](https://img-blog.csdnimg.cn/097f6469c1e5432b855ab5c8153d95aa.png)




![[附源码]JAVA毕业设计流行病调查平台(系统+LW)](https://img-blog.csdnimg.cn/dff8c562a06c4b20b3ba206960130c4a.png)





![[附源码]JAVA毕业设计楼宇管理系统(系统+LW)](https://img-blog.csdnimg.cn/358a480986c54203bf2c293d13151b04.png)