Skip to content

Progress indicator during CSV loading #84

@vmvarela

Description

@vmvarela

Description

When piping large CSV files, sql-pipe appears frozen — there is no feedback while rows are being inserted. A lightweight progress indicator on stderr eliminates the "is it working?" uncertainty.

Example

Loading... 125,000 rows\r
Loading... 250,000 rows\r
Loaded 312,450 rows in 1.2s

Acceptance Criteria

  • During CSV loading, print a running row count to stderr using carriage return (\r) to update in place — no newlines until done
  • Only shown when stderr is a TTY (suppressed in pipelines and scripts)
  • Update frequency: every 10,000 rows (or configurable via constant) — not every row
  • After loading completes, overwrite with final Loaded <n> rows in <t>s and a newline
  • If --max-rows is set, show it as Loading... 5,000 / 100,000 rows
  • Zero performance overhead when stderr is not a TTY
  • README.md updated

Notes

  • Depends on / pairs well with #U1 (row count after load) — can be done together
  • Use std.os.isatty or equivalent in Zig to detect TTY
  • Elapsed time via std.time.milliTimestamp()

Dependencies

Depends on #83 (row count must be tracked before a progress indicator can show it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumShould be done soonsize:sSmall — 1 to 4 hoursstatus:readyRefined and ready for sprint selectiontype:featureNew functionality

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions