|
| 1 | +# Data Dictionary for Gold Layer |
| 2 | + |
| 3 | +## Overview |
| 4 | +The Gold Layer is the business-level data representation, structured to support analytical and reporting use cases. It consists of **dimension tables** and **fact tables** for specific business metrics. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +### 1. **gold.dim_customers** |
| 9 | +- **Purpose:** Stores customer details enriched with demographic and geographic data. |
| 10 | +- **Columns:** |
| 11 | + |
| 12 | +| Column Name | Data Type | Description | |
| 13 | +|------------------|---------------|-----------------------------------------------------------------------------------------------| |
| 14 | +| customer_key | INT | Surrogate key uniquely identifying each customer record in the dimension table. | |
| 15 | +| customer_id | INT | Unique numerical identifier assigned to each customer. | |
| 16 | +| customer_number | NVARCHAR(50) | Alphanumeric identifier representing the customer, used for tracking and referencing. | |
| 17 | +| first_name | NVARCHAR(50) | The customer's first name, as recorded in the system. | |
| 18 | +| last_name | NVARCHAR(50) | The customer's last name or family name. | |
| 19 | +| country | NVARCHAR(50) | The country of residence for the customer (e.g., 'Australia'). | |
| 20 | +| marital_status | NVARCHAR(50) | The marital status of the customer (e.g., 'Married', 'Single'). | |
| 21 | +| gender | NVARCHAR(50) | The gender of the customer (e.g., 'Male', 'Female', 'n/a'). | |
| 22 | +| birthdate | DATE | The date of birth of the customer, formatted as YYYY-MM-DD (e.g., 1971-10-06). | |
| 23 | +| create_date | DATE | The date and time when the customer record was created in the system| |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +### 2. **gold.dim_products** |
| 28 | +- **Purpose:** Provides information about the products and their attributes. |
| 29 | +- **Columns:** |
| 30 | + |
| 31 | +| Column Name | Data Type | Description | |
| 32 | +|---------------------|---------------|-----------------------------------------------------------------------------------------------| |
| 33 | +| product_key | INT | Surrogate key uniquely identifying each product record in the product dimension table. | |
| 34 | +| product_id | INT | A unique identifier assigned to the product for internal tracking and referencing. | |
| 35 | +| product_number | NVARCHAR(50) | A structured alphanumeric code representing the product, often used for categorization or inventory. | |
| 36 | +| product_name | NVARCHAR(50) | Descriptive name of the product, including key details such as type, color, and size. | |
| 37 | +| category_id | NVARCHAR(50) | A unique identifier for the product's category, linking to its high-level classification. | |
| 38 | +| category | NVARCHAR(50) | The broader classification of the product (e.g., Bikes, Components) to group related items. | |
| 39 | +| subcategory | NVARCHAR(50) | A more detailed classification of the product within the category, such as product type. | |
| 40 | +| maintenance_required| NVARCHAR(50) | Indicates whether the product requires maintenance (e.g., 'Yes', 'No'). | |
| 41 | +| cost | INT | The cost or base price of the product, measured in monetary units. | |
| 42 | +| product_line | NVARCHAR(50) | The specific product line or series to which the product belongs (e.g., Road, Mountain). | |
| 43 | +| start_date | DATE | The date when the product became available for sale or use, stored in| |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +### 3. **gold.fact_sales** |
| 48 | +- **Purpose:** Stores transactional sales data for analytical purposes. |
| 49 | +- **Columns:** |
| 50 | + |
| 51 | +| Column Name | Data Type | Description | |
| 52 | +|-----------------|---------------|-----------------------------------------------------------------------------------------------| |
| 53 | +| order_number | NVARCHAR(50) | A unique alphanumeric identifier for each sales order (e.g., 'SO54496'). | |
| 54 | +| product_key | INT | Surrogate key linking the order to the product dimension table. | |
| 55 | +| customer_key | INT | Surrogate key linking the order to the customer dimension table. | |
| 56 | +| order_date | DATE | The date when the order was placed. | |
| 57 | +| shipping_date | DATE | The date when the order was shipped to the customer. | |
| 58 | +| due_date | DATE | The date when the order payment was due. | |
| 59 | +| sales_amount | INT | The total monetary value of the sale for the line item, in whole currency units (e.g., 25). | |
| 60 | +| quantity | INT | The number of units of the product ordered for the line item (e.g., 1). | |
| 61 | +| price | INT | The price per unit of the product for the line item, in whole currency units (e.g., 25). | |
0 commit comments