Import a CSV that has no header row (cafes)
The till system writes daily takings without a header line. Name the columns yourself and type them.
- 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
Import headerless CSV data without losing the first row, and name columns from a known layout.
Bean There Cafés (fictional) send each site's daily takings from the till as a plain CSV with no header.
Steps
TakingsFilehas no header row. Every line is: store, date (yyyy-mm-dd), amount.- Don't promote headers (the first line is data). Name the columns
Store,DateandAmount. - Set
Dateto a date andAmountto a decimal number (en-US).
Your result must
- The first line is a data row, not a header
- Columns: Store, Date, Amount
- Date is a date, Amount a number
Input
- TakingsFile (file)
- Text file; first line: Riverside,2026-04-14,1231.41
- Every field is text until you set types
Expected output columns
Store (text), Date (date), Amount (number)
| Store | Date | Amount |
|---|---|---|
| Riverside | 2026-04-14 | 1231.41 |
| Market Sq | 2026-03-07 | 340.92 |
| Mill Lane | 2026-04-06 | 971.18 |