Your question is Standardizing CSV Column Headers. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How would you standardize inconsistent column headers across multiple large CSV files?
Use the provided metadata tables to return each observed header after normalization and canonical mapping. Unmapped headers must remain visible for review.
file_id, file_name, normalized_header, raw_headers, standardized_header, mapping_status, and header_countfile_id and normalized_header| Column | Type | Description |
|---|---|---|
| file_idPK | INT | Unique identifier for a CSV file |
| file_name | VARCHAR(255) | Source CSV file name |
| Column | Type | Description |
|---|---|---|
| raw_header_idPK | INT | Unique identifier for an observed header |
| file_id | INT | CSV file containing the header |
| header_name | VARCHAR(255) | Header text exactly as observed in the file |
| Column | Type | Description |
|---|---|---|
| normalized_headerPK | VARCHAR(255) | Normalized header lookup key |
| canonical_header | VARCHAR(255) | Approved standardized header name |