Skip to content

Commit a913e64

Browse files
committed
add data_catalog
1 parent 52c6558 commit a913e64

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

docs/data_catalog.md

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

0 commit comments

Comments
 (0)