dwh_create_date timestamp column for audit tracking.
CRM Tables
crm_cust_info
Cleaned customer information from the CRM system with standardized gender and marital status values.Customer ID (primary identifier)
Customer key (trimmed)
Customer first name
Customer last name
Marital status (standardized: ‘Single’, ‘Married’, ‘n/a’)
Gender (standardized: ‘Male’, ‘Female’, ‘n/a’)
Date when customer record was created
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
crm_prd_info
Cleaned product information with parsed category IDs and standardized product lines.Product ID
Category ID (extracted from product key)
Product key (parsed from original)
Product name
Product cost
Product line (standardized: ‘Mountain’, ‘Road’, ‘Other sales’, ‘Touring’, ‘n/a’)
Product availability start date
Product availability end date (calculated using LEAD window function)
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
crm_sales_details
Cleaned sales transaction details with validated dates and corrected price/sales calculations.Sales order number
Product key (foreign key to products)
Customer ID (foreign key to customers)
Order date (validated and converted from YYYYMMDD format)
Ship date (validated and converted from YYYYMMDD format)
Due date (validated and converted from YYYYMMDD format)
Total sales amount (calculated/corrected as needed)
Quantity sold
Unit price (validated and corrected)
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
ERP Tables
erp_cust_az12
Cleaned ERP customer data with validated birth dates and standardized gender values.Customer ID (cleaned from source)
Birth date (validated - future dates set to NULL)
Gender (standardized: ‘Male’, ‘Female’, ‘n/a’)
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
erp_loc_a101
Cleaned ERP location data with standardized country names.Customer ID (hyphens removed)
Country (standardized: ‘United States’, ‘Canada’, ‘Germany’, etc.)
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
erp_px_cat_g1v2
ERP product category data (minimal transformations applied).Product category ID
Category
Subcategory
Maintenance information
Data warehouse ingestion timestamp (default: CURRENT_TIMESTAMP)
All Silver tables are truncated and reloaded during each ETL run via the
silver.load_silver() stored procedure.