Import a semicolon-separated stock file (cafe)
Read a CSV that uses semicolons, promote headers and set number types.
- Level
- beginner
- Time
- ~7 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Import delimited text with the right delimiter, then promote headers and type the columns.
The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.
Input
- StockFile (file)
- Text file; first line: SKU;Item;Warehouse;OnHand;ReorderLevel;Supplier;UnitCost
- Every field is text until you set types
Expected output columns
SKU (text), Item (text), Warehouse (text), OnHand (number), ReorderLevel (number), Supplier (text), UnitCost (number)