

# ALTER TABLE SET TBLPROPERTIES
<a name="querying-iceberg-alter-table-set-properties"></a>

向 Iceberg 表中添加属性并设置它们的分配值。

根据 [Iceberg 规范](https://iceberg.apache.org/#spec/#table-metadata-fields)，表属性存储在 Iceberg 表元数据文件中，而不是存储在 AWS Glue 中。Athena 不接受自定义表属性。请参阅 [指定表属性](querying-iceberg-creating-tables.md#querying-iceberg-table-properties) 部分，了解允许的键值对。您也可以使用 `ALTER TABLE SET TBLPROPERTIES` 和 `ALTER TABLE UNSET TBLPROPERTIES` 来设置或移除 `write.data.path` 和 `write.object-storage.path` Iceberg 表属性。如果您希望 Athena 支持特定的开源表配置属性，请将反馈发送至 [athena-feedback@amazon.com](mailto:athena-feedback@amazon.com)。

## 摘要
<a name="querying-iceberg-alter-table-set-properties-synopsis"></a>

```
ALTER TABLE [db_name.]table_name SET TBLPROPERTIES ('property_name' = 'property_value' [ , ... ])
```

## 示例
<a name="querying-iceberg-alter-table-set-properties-example"></a>

```
ALTER TABLE iceberg_table SET TBLPROPERTIES (
  'format'='parquet',
  'write_compression'='snappy',
  'optimize_rewrite_delete_file_threshold'='10'
)
```

以下示例会在现有 Iceberg 表上设置 `write.data.path` 属性。

```
ALTER TABLE iceberg_table SET TBLPROPERTIES (
  'write.data.path'='s3://amzn-s3-demo-bucket/your-folder/data'
)
```