-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority:highMust be in the next sprintMust be in the next sprintsize:sSmall — 1 to 4 hoursSmall — 1 to 4 hoursstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:featureNew functionalityNew functionality
Milestone
Description
Description
Currently, SQL errors are passed through from SQLite verbatim. Messages like no such column: foo give no context about which CSV field mapping failed or what the table schema looks like, making it hard to debug mismatched field names.
Example
Current:
error: no such column: revenue
Desired:
error: no such column: revenue
table "t" has columns: id, amount, region, date
hint: did you mean "amount"?
Acceptance Criteria
- On SQL error (exit code 3), print the SQLite error message as today
- Additionally print the list of available column names from
PRAGMA table_info(t)to stderr - If the missing identifier closely matches an existing column name (edit distance ≤ 2), add a
hint: did you mean "<col>"?line - On CSV parse errors (exit code 2), include the 1-based row number in the error message
- New behaviour is reflected in README.md (Exit Codes section and error message examples)
- Tests cover: unknown column (with available columns printed), CSV parse error with row number
Notes
- Column list comes from
PRAGMA table_info(t)after the table is created - Levenshtein / edit-distance can be a small helper function; keep it simple (≤ 2 substitutions)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:highMust be in the next sprintMust be in the next sprintsize:sSmall — 1 to 4 hoursSmall — 1 to 4 hoursstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:featureNew functionalityNew functionality