Import a CSV whose descriptions contain commas (hardware)
Some item descriptions contain commas and quote marks. Import the file so each description stays in one column.
- Level
- beginner
- Time
- ~6 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Understand CSV quoting: commas inside a quoted field belong to the value.
Tinker Depot (fictional) runs two warehouses for hardware supplies and exports stock levels nightly.
Steps
ItemFileis a comma-separated file. Fields that contain commas or quote marks are wrapped in double quotes, with inner quotes doubled.- Parse it so quoted fields stay whole (QuoteStyle.Csv), and use the first row as headers.
- Set
OnHandto a whole number. KeepSKUandDescriptionas text. OutputSKU,Description,OnHand.
Your result must
- Three columns: SKU, Description, OnHand
- "Hinge, small" stays one value
- Inch marks like 12" survive
Input
- ItemFile (file)
- Text file; first line: SKU,Description,OnHand
- Every field is text until you set types
Expected output columns
SKU (text), Description (text), OnHand (number)
| SKU | Description | OnHand |
|---|---|---|
| SKU-001 | Hinge, 12" long | 69 |
| SKU-002 | Hinge, pack of 10 | 62 |
| SKU-003 | Wood Screw, 12" long | 16 |