

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

# S3 Storage Lens 匯出至 S3 Tables 的資料表命名
<a name="storage-lens-s3-tables-naming"></a>

當您將 S3 Storage Lens 指標匯出至 S3 Tables 時，系統會使用具有特定命名模式的 Apache Iceberg 目錄慣例來組織資料表，以確保相容性和組織性。

## 資料表位置結構
<a name="storage-lens-s3-tables-naming-location"></a>

完整的資料表位置遵循此模式：

```
s3tablescatalog/aws-s3/<namespace>/<table-name>
```

### 資料表儲存貯體名稱
<a name="storage-lens-s3-tables-naming-bucket"></a>

 **資料表儲存貯體：** `aws-s3`

S3 Storage Lens 匯出使用`aws-s3`資料表儲存貯體，這是 AWS S3-related系統資料表的指定儲存貯體。

### 目錄名稱
<a name="storage-lens-s3-tables-naming-catalog"></a>

 **目錄：** `s3tablescatalog/aws-s3`

S3 Storage Lens 資料表存放在 S3 目錄中，因為 Storage Lens 提供三種 S3 資源類型的洞見：
+ 儲存指標
+ 儲存貯體屬性
+ API 用量指標

## 命名慣例
<a name="storage-lens-s3-tables-naming-namespace"></a>

命名空間會組織目錄中的資料表。對於 S3 Storage Lens，命名空間衍生自 Storage Lens 組態 ID。

### 標準命名空間格式
<a name="storage-lens-s3-tables-naming-namespace-standard"></a>

對於沒有點IDs (`.`)：

```
lens_<configuration-id>_exp
```

 **範例：**如果您的組態 ID 為 `my-lens-config`，命名空間將為：

```
lens_my-lens-config_exp
```

### 使用點字元或大寫字母處理的命名空間格式
<a name="storage-lens-s3-tables-naming-namespace-dots"></a>

Storage Lens IDs 可包含點 (`.`) 或大寫字母 (`A-Z`)，但 S3 Tables 命名空間僅支援小寫字母、數字、連字號 (`-`) 和底線 ()`_`。當您的組態 ID 包含點時，它們會轉換為連字號、大寫字母會轉換為小寫字母，並新增雜湊尾碼以求唯一性：

```
lens_<configuration-id-with-dots-or-uppercase-replaced>_exp_<7-char-hash>
```

 **範例：**如果您的組態 ID 為 `my.LENS.config`，命名空間將為：

```
lens_my-lens-config_exp_a1b2c3d
```

其中 `a1b2c3d`是原始組態 ID 之 SHA-1 雜湊的前 7 個字元。

## 完成範例
<a name="storage-lens-s3-tables-naming-examples"></a>

針對 ID 為 的 Storage Lens 組態`production-metrics`：
+  **資料表儲存貯體：** `aws-s3`
+  **目錄：** `s3tablescatalog/aws-s3`
+  **命名空間：** `lens_production-metrics_exp`
+  **完整路徑：** `s3tablescatalog/aws-s3/lens_production-metrics_exp/<table-name>`

針對 ID 為 的 Storage Lens 組態`prod.us.east.metrics`：
+  **資料表儲存貯體：** `aws-s3`
+  **目錄：** `s3tablescatalog/aws-s3`
+  **命名空間：** `lens_prod-us-east-metrics_exp_f8e9a1b` （含雜湊）
+  **完整路徑：** `s3tablescatalog/aws-s3/lens_prod-us-east-metrics_exp_f8e9a1b/<table-name>`

## 資料表類型
<a name="storage-lens-s3-tables-naming-types"></a>

下表顯示為 S3 Storage Lens 匯出建立的不同資料表類型：


| 目錄 | 命名空間 | S3 資料表名稱 | Description | 
| --- | --- | --- | --- | 
| s3tablescatalog/aws-s3 | lens\$1<conf\$1name>\$1exp【\$1<hash>】 | default\$1storage\$1metrics | 此資料表包含 Storage Lens 組態的儲存指標。 | 
| s3tablescatalog/aws-s3 | lens\$1<conf\$1name>\$1exp【\$1<hash>】 | default\$1activity\$1metrics | 此資料表包含 Storage Lens 組態的活動指標。 | 
| s3tablescatalog/aws-s3 | lens\$1<conf\$1name>\$1exp【\$1<hash>】 | expand\$1prefixes\$1storage\$1metrics | 此資料表包含 Storage Lens 組態中所有字首的儲存指標。 | 
| s3tablescatalog/aws-s3 | lens\$1<conf\$1name>\$1exp【\$1<hash>】 | expand\$1prefixes\$1activity\$1metrics | 此資料表包含 Storage Lens 組態中所有字首的活動指標。 | 
| s3tablescatalog/aws-s3 | lens\$1<conf\$1name>\$1exp【\$1<hash>】 | bucket\$1property\$1metrics | 此資料表包含 Storage Lens 組態中所有儲存貯體的儲存貯體屬性指標。 | 

## 後續步驟
<a name="storage-lens-s3-tables-naming-next-steps"></a>
+ 了解 [了解 S3 Storage Lens 資料表結構描述](storage-lens-s3-tables-schemas.md) 
+ 了解 [S3 Storage Lens 資料表的許可](storage-lens-s3-tables-permissions.md) 