How do you approach cleaning and preparing a large, messy dataset for analysis?
Use the provided raw transaction records and customer directory. Return one cleaned row per latest nonblank transaction key, ignoring records with invalid amounts, nonpositive amounts, or a NULL transaction date.
transaction_key, customer_code, customer_name, region, transaction_date, amount, normalized_status, and category.Unknown.transaction_date ascending, then transaction_key ascending.| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique raw record identifier |
| transaction_key | VARCHAR(20) | Business transaction identifier |
| customer_code | VARCHAR(10) | Customer identifier from the source system |
| amount_text | VARCHAR(30) | Transaction amount stored as raw text |
| transaction_date_text | VARCHAR(20) | Transaction date stored as raw text |
| status_text | VARCHAR(30) | Raw transaction status |
| category_text | VARCHAR(40) | Raw transaction category |
| updated_at | TIMESTAMP | Source record update timestamp |
| Column | Type | Description |
|---|---|---|
| customer_codePK | VARCHAR(10) | Customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| region | VARCHAR(30) | Customer geographic region |