

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# データレイヤー内の Amazon S3 バケットに名前を付ける
<a name="naming-structure-data-layers"></a>

以下のセクションでは、データレイクレイヤー内の Amazon Simple Storage Service (Amazon S3) バケットの命名構造について説明します。ただし、組織の要件に応じて Amazon S3 バケットとパス名をカスタマイズできます。アーカイブ、バージョニング、アクセス、暗号化の要件はレイヤーごとに異なる可能性があるため、レイヤーごとに個別のバケットを作成することをお勧めします。

次の図は、推奨データレイクレイヤー内の Amazon S3 バケットの推奨命名構造を示しています。命名構造は、複数のビジネスユニット、ファイル形式、パーティションを分離します。



![S3 バケットの命名方法は、目的のデータレイヤーによって異なります。](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/images/data-lake-naming-diag-1.png)


**重要**  
Amazon S3 バケットは、Amazon S3 ドキュメントの[バケット命名規則の命名](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html)ガイドラインに従う必要があります。

データパーティションは、組織の要件に応じて調整できます。ただし、 `MSCK REPAIR TABLE` コマンドでカタログを更新できるように、小文字とキーと値のペア ( `year=yyyy`の代わりに など`yyyy`) を使用する必要があります。

パーティション戦略の定義は、データの性質と、最も重要なのはユーザークエリの性質によって異なります。消費パターンとデータ処理パターンを分析して、組織に最適な戦略を見つけることをお勧めします。一般的に、raw データレイヤーでは `year=yyyy`、、 `month=mm`などの高い階層レベルを提供し`day=dd`、ステージレイヤーや分析レイヤーなどの消費データレイヤーでは低い階層レベルを提供することは理にかなっています。これは、通常、raw データレイヤーにはデータ処理パイプラインの複雑な消費パターンがないためです。

## ランディングゾーン Amazon S3 バケット
<a name="landing-zone-naming-structure"></a>

機密データデータセットに raw バケットに移動する前にマスクする必要がある要素が含まれている場合は、ランディングゾーンに Amazon S3 バケットが必要です。

次の表は、ランディングゾーンレイヤー内の Amazon S3 バケットの命名構造、命名構造の説明、および名前の例を示しています。


****  

| 命名形式 | 例 | 
| --- | --- | 
| `s3://companyname-landingzoneawsregion-awsaccount\|uniqidenv/source/source_region/table/year=yyyy/month=mm/day=dd/table_<yearmonthday>.avro\|csv`[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html) | `s3://anycompany-landingzoneuseast1-12345-dev/socialmedia/us/tb_products/year=2021/month=03/day=01/products_20210301.csv` | 

## Raw レイヤー Amazon S3 バケット
<a name="raw-data-layer-naming-structure"></a>

raw データレイヤーには、変換されておらず、JSON や CSV などの 元のファイル形式である取り込まれたデータが含まれます。このデータは、通常、データソースと raw データレイヤーの Amazon S3 バケットに取り込まれた日付によって整理されます。

次の表は、raw データレイヤー内の Amazon S3 バケットの命名構造、命名構造の説明、および名前の例を示しています。


****  

| 命名形式 | 例 | 
| --- | --- | 
| `s3://companyname-raw-awsregion-awsaccount\|uniqid-env/source/source_region/table/year=yyyy/month=mm/day=dd/table_<yearmonthday>.avro\|csv`[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html) | `s3://anycompany-raw-useast1-12345-dev/socialmedia/us/tb_products/year=2021/month=03/day=01/products_20210301.csv` | 

## ステージレイヤー Amazon S3 バケット
<a name="stage-data-layer-naming-structure"></a>

ステージレイヤー内のデータは、raw レイヤーから (たとえば、 AWS Glue または Amazon EMR ジョブを使用して) 読み取りおよび変換されます。このプロセスでは、データを検証し (データ型やヘッダーをチェックするなど）、Apache Parquet などのすぐに使用できるファイル形式で保存します。メタデータは のテーブルに保存されます[AWS Glue Data Catalog](https://docs.aws.amazon.com/glue/latest/dg/components-overview.html)。

次の表は、ステージデータレイヤー内の Amazon S3 バケットの命名構造、命名構造の説明、および名前の例を示しています。


****  

| 命名形式 | 例 | 
| --- | --- | 
| `s3://companyname-stageawsregion-awsaccount\|uniqidenv/source/source_region/ business_unit/table/<partitions>/table_<table_name>_<yearmonthday>.snap`[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html) | `s3://anycompany-stagesaeast1-12345-dev/sap/br/customers/validated/dt=2021-03-01/table_customers_20210301.snappy.parquet py.parquet` | 

## 分析レイヤー Amazon S3 バケット
<a name="analytics-data-layer-naming-structure"></a>

分析レイヤーは、データが処理されたファイル形式であるため、ステージレイヤーと似ていますが、データは組織の要件に従って集計されます。

次の表は、分析データレイヤー内の Amazon S3 バケットの命名構造、命名構造の説明、および名前の例を示しています。


****  

| 命名形式 | 例 | 
| --- | --- | 
| `s3://companyname-analytics-awsregion-awsaccount\|uniqid-env/source_region/business_unit/tb_<region>_<table_name>_<file_format>/<partition_0>/<partition_1>/.../<partition_n>/xxxxx.<compression>.<file_format>`[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/prescriptive-guidance/latest/defining-bucket-names-data-lakes/naming-structure-data-layers.html) | `s3://anycompany-analytics-useast1-12345-dev/us/sales/tb_us_customers_parquet/<partitions>/part-000001-20218c886790.c000.snappy.parquet` | 