

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

# 故障排除 AWS Clean Rooms
<a name="troubleshooting"></a>

本节介绍使用时可能出现的一些常见问题 AWS Clean Rooms 以及如何解决这些问题。

**Topics**
+ [

## 查询所引用的一个或多个表不能由其关联的服务角色访问。 table/role 所有者必须向服务角色授予对表的访问权限。
](#table-not-accessible)
+ [

## 其中一个底层数据集的文件格式不受支持。
](#dataset-has-unsupported-file-format)
+ [

## 使用 Clean Rooms 加密计算时，查询结果不如预期。
](#troubleshoot-query-results-c3r)
+ [

## AWS Clean Rooms Spark SQL：缺少分区
](#troubleshoot-missing-partition-data)

## 查询所引用的一个或多个表不能由其关联的服务角色访问。 table/role 所有者必须向服务角色授予对表的访问权限。
<a name="table-not-accessible"></a>
+ 验证服务角色的权限是否已按要求设置。有关更多信息，请参阅[设置 AWS Clean Rooms](setting-up.md)。

## 其中一个底层数据集的文件格式不受支持。
<a name="dataset-has-unsupported-file-format"></a>
+ 确保您的数据集采用支持的文件格式之一：
  + Parquet 
  + RCFile
  + TextFile
  + SequenceFile
  + RegexSerde
  + OpenCSV
  + AVRO
  + JSON

  有关更多信息，请参阅 [的数据格式 AWS Clean Rooms](data-formats.md)。

## 使用 Clean Rooms 加密计算时，查询结果不如预期。
<a name="troubleshoot-query-results-c3r"></a>

如果您使用 Clean Rooms 加密计算 (C3R)，请验证您的查询是否正确使用了加密列：
+ sealed 列仅用于 SELECT 子句。
+ fingerprint 列仅用于 JOIN 子句（以及某些条件下的 GROUP BY 子句）。
+ 只有在协作设置要求的情况下，才 JOINing 具有相同名称的 fingerprint 列。

有关更多信息，请参阅[加密计算 Clean Rooms](crypto-computing.md)和[Clean Rooms 加密计算中的列类型](crypto-computing-column-types.md)。

## AWS Clean Rooms Spark SQL：缺少分区
<a name="troubleshoot-missing-partition-data"></a>

中的所有分区还 AWS Glue Data Catalog 必须在 S3 中包含数据。引擎使用 Spark 设置 `spark.sql.files.ignoreMissingFiles=False`

有关更多信息，请参阅 [https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html\$1 ignore-missing-files](https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html#ignore-missing-files)。

如果遇到此错误，您将收到以下错误消息：`"Missing partition data: One of the configured tables is partitioned and one or more of the partitions does not have data".`

将您在 Amazon S3 中的数据与表中列出的分区 AWS Glue Data Catalog 进行比较。删除 S3 中没有相应数据的分区。