

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 迁移选项摘要
<a name="migration-options"></a>

下表汇总了每种迁移选项的主要特征和注意事项。


| **功能** | **就地迁移** [快照](table-migration-inplace.md#in-place-snapshot) | **就地迁移** [migrate](table-migration-inplace.md#in-place-migrate) | **完整数据迁移** [CTAS 或（创建表格 \$1 插入）](table-migration-full.md) | 
| --- | --- | --- | --- | 
| **作为迁移过程一部分的数据布局改进** |  |  |  | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| **支持的文件格式** | Parquet、Avro、ORC | Parquet、Avro、ORC | Parquet、Avro、ORC、JSON、CSV | 
| **用冰山表替换源表** |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否（创建新表，但通过其他步骤可以替换源表） |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是（创建备份表并用 Iceberg 表替换源表） |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否（创建新表） | 
| **源表影响** |  |  |  | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) | 损坏源表 | 损坏备份表 | 安全，来源不受影响 | 
| **冰山桌子冲击** |  |  |  | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) | 腐化冰山桌 | 腐化冰山桌 | 对冰山桌子没有影响 | 
| [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/migration-options.html) | 在新桌子上不可见（需要合并分区`add_files`） | 在新桌子上不可见（需要合并分区`add_files`） | 在新桌子上不可见（需要`INSERT INTO`新表） | 
| **成本** | 低 | 低 | 更高（完整数据重写） | 
| **迁移速度** | 快速 | 快速 | 慢一点 | 
| **可用于迁移到 Amazon S3 表** |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否 |  ![\[Yes\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-yes.png) 是 | 
| **需要手动 DDL** |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否（架构和分区是从源表中复制的） |  ![\[No\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/apache-iceberg-on-aws/images/icon-no.png) 否（架构和分区是从源表中复制的） | 如果使用 CTAS，则只需要指定分区 | 
| **最佳用途** | 无需重写数据即可快速迁移，允许 side-by-side使用 Hive 和 Iceberg 进行测试或逐步过渡。 | 当可以立即切换时，无需重写数据即可在原地替换 Hive 表。 | 通过数据重写实现全面的冰山优化。非常适合重新设计分区或架构，或者改善布局和性能。如果可能，请务必推荐。 | 