Qikuyueser.com

Reconcile Migrated Data by Sampling

Added 2026-10

Reconcile Migrated Data by Sampling — Chinese original prompt

数据已从 [旧库] 迁到 [新库],需要验证一致性。请设计对账方案:按主键抽样与全量计数结合、逐字段比对规则(空值、精度、编码、时区)、差异分类与归因。输出:对账查询与脚本思路、抽样比例建议、差异报告的结构、以及发现系统性偏差时的回退判断。
Site original

Chinese original

Open in ChatGPT

Example

Sample input

数据从旧订单库迁到新库,需要验证一致性,帮我设计抽样对账方案和差异归因。

The output should include

  • 抽样与全量计数结合的方案
  • 逐字段比对含空值精度时区
  • 差异分类归因与回退的判断

Replace these placeholders 2

Swap the bracketed parts for your own details before sending.

  • [旧库]
  • [新库]
How to use

金额和时间字段一定要逐值比,这两类差异最容易被四舍五入掩盖。

Try tweaking it

  • Have it restate requirements and constraints before writing code.
  • Ask for the smallest change plus a rollback path, not a full-file rewrite.

What you should get

  • A minimal, runnable change with copy-ready code
  • Impact list: which files and call sites must follow

Common mistakes

  • Asking it to touch ten files at once, then losing track of what broke what.
  • Pasting only the error, with no code or version, and getting an unfixable answer.

How to check the output

  • The change runs, can be rolled back, and touches nothing unrelated.
  • Edge cases (empty, oversized, concurrent) are covered or explained.

Where it works

  • Good for: having it restate requirements and constraints, then propose the smallest runnable change.
  • Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.

More in this topic