Code RoomCSV to Postgres importer
MediumPrep Room Coding #4262

CSV to Postgres importer

Vibe & agenticAlgorithms & data structuresMid–Senior~24 min

Greenfield Go service: an AI agent will build a CSV-to-Postgres importer where admins upload customer records (up to ~2M rows), and you need per-row validation, a dry-run preview, and a partial-failure report rather than all-or-nothing. Describe how you'd direct the agent — streaming vs. load-all, the validation strategy, transaction boundaries, and acceptance criteria. Where does a one-shot 'import this CSV' prompt fail at this scale?

Implement
build_import_report(rows: list[str], chunk_size: int) → list[str]
Examples
in[["ada@example.com,Ada,36","bob@example.com,Bob,41","carl@example.com,Carl,29"],2]out["imported=3 skipped=0 chunks=2"]
in[["ada@example.com,Ada,36","no-at-sign,Bob,41","ADA@example.com,Ada,36","carl@example.com,,29"],5]out["imported=1 skipped=3 chunks=1","row=2 error=invalid_email","row=3 error=duplicate_email","row=4 error=missing_name"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 24 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.