All workflows
Workflows/Data & schema/07

Backfill data

Run the backfill and watch both its output and the table it writes to. Stop it the moment the numbers look wrong.

The board

nvim The backfill script: it asks Stripe for each refund's status, 5 a second.
Database A count you run again as it goes.
Processes The script's progress output, with Stop on its row.

Step by step

  1. 01
    Dry run Add a process named dry-run: pnpm backfill --dry-run. It counts the refunds to do, asks Stripe about the first 20, saves nothing, and exits.
    processes
  2. 02
    Run it for real Add it again as backfill, without the flag. Progress streams in its row, a line every 20 refunds.
    processes
  3. 03
    Watch the table Count refunds by status in the Database column, then Run again as it goes. The NULLs fall in step with the log.
    database
  4. 04
    Stop if it drifts Press Stop on the backfill row: it ends there, and nothing else on the board is touched. It only asks about refunds still without a status, so Start carries on where it stopped.
    processes

Close the other windows.

Get ORVEN