A backfill prompt needs source and target schema versions, primary key, tenancy boundary, snapshot or high-water mark, write environment, owner, and acceptance criteria. The model may draft a transformation plan but cannot infer live data from a small schema sample. State whether the source continues to receive writes and how later changes will be replayed. Counts from different instants can disagree even when both systems are correct; a fixed population must anchor each comparison.
Make this comfortable
Backfill prompts: pin source, target, and snapshot
Operational case
Harbor's review snapshot H-47 holds 47,000 keyed order rows. The new status field must preserve each row's tenant and business meaning. A sample of familiar statuses is insufficient: the reviewer asks for a complete distinct-value inventory and records the change-stream watermark. The draft runbook names a restricted execution role, but the prompt output grants no production write permission.
Snapshot H-47: 47,000 source orders
Key: tenant_id + order_id
Target schema version: recorded
Writes continue: yes; tail watermark needed
Prompt output: plan, not execution approvalPerformance and review cost
Inventorying N source rows is O(N) scanning; a key manifest costs O(N) storage. This preparation prevents moving counts from being mistaken for data loss. Scope scans to authorized tenants and preserve the snapshot ID for validation.
Common Mistakes
- Do not compare unpinned source and target counts.
- Do not infer all legacy values from a sample.
- Do not give a planning prompt a write credential.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Schema migration prompts: check old and new clients together
- Dataset intake prompts: define a column before analyzing it
- Backfill prompts: map known states and quarantine unknowns
- Backfill prompts: bound batches and make retries idempotent
- Backfill prompts: account for writes during migration
- Backfill prompts: compare count and field-level parity
- Backfill prompts: hold cutover until fallback is rehearsed
- Project: review Harbor's order-status backfill
- Database backfill prompt decisions
prompt engineering
database migration
