

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 Athena for Spark 中的非 Hive 資料表格式
<a name="notebooks-spark-table-formats"></a>

**注意**  
此頁面是指在發行版本 Pyspark 引擎第 3 版中使用 Python 程式庫。如需支援的開放資料表格式版本，請參閱 [Amazon EMR 7.12。](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-7120-release.html)

當您在 Athena for Spar 中搭配使用工作階段和筆記本時，除了 Apache Hive 資料表，您還可以使用 Linux Foundation Delta Lake、Apache Hudi 和 Apache Iceberg 資料表。

## 考量和限制
<a name="notebooks-spark-table-formats-considerations-and-limitations"></a>

當您使用 Apache Hive 與 Athena for Spark 以外的資料表格式時，請考慮下列幾點：
+ 除了 Apache Hive 之外，每部筆記型電腦只支援一種資料表格式。若要在 Athena for Spark 中使用多種資料表格式，請為每種資料表格式建立個別的筆記本。如需有關在 Athena for Spark 中建立筆記本的資訊，請參閱 [步驟 7：建立您自己的筆記本](notebooks-spark-getting-started.md#notebooks-spark-getting-started-creating-your-own-notebook)。
+ Delta Lake、Hudi 和 Iceberg 資料表格式已在 Athena for Spark 上使用 AWS Glue 做為中繼存放區進行測試。您可能可以使用其他中繼存放區，但目前不支援此類用法。
+ 若要使用其他資料表格式，請覆寫 Athena 主控台和本文件中所述的預設 `spark_catalog` 屬性。除了其自己的資料表格式之外，這些非 Hive 目錄還可以讀取 Hive 資料表。

## 檔案版本
<a name="notebooks-spark-table-formats-versions"></a>

下表顯示 Amazon Athena for Apache Spark 中支援的非 Hive 資料表版本。


****  

| 資料表格式 | 支援的版本 | 
| --- | --- | 
| Apache Iceberg | 1.2.1 | 
| Apache Hudi | 0.13 | 
| Linux Foundation Delta Lake | 2.0.2 | 

在 Athena for Spark 中，這些資料表格式 `.jar` 檔案及其依賴關係會載入到 Spark 驅動程式和執行程式的類路徑中。

如需有關如何在 Amazon Athena 筆記本中使用 Spark SQL 的 Iceberg、Hudi 和 Delta Lake 資料表格式的 *AWS 巨量資料部落格*文章，請參閱[針對開放原始碼交易資料表格式搭配使用 Amazon Athena 與 Spark SQL](https://aws.amazon.com/blogs/big-data/use-amazon-athena-with-spark-sql-for-your-open-source-transactional-table-formats/)。

**Topics**
+ [考量和限制](#notebooks-spark-table-formats-considerations-and-limitations)
+ [檔案版本](#notebooks-spark-table-formats-versions)
+ [Iceberg](notebooks-spark-table-formats-apache-iceberg.md)
+ [Hudi](notebooks-spark-table-formats-apache-hudi.md)
+ [Delta Lake](notebooks-spark-table-formats-linux-foundation-delta-lake.md)