A pipeline's transformation tests pass with a mocked database writer, but deployments fail because generated records violate the destination table's constraints. Which practice would BEST detect this problem before production deployment?
Show the answer
Correct answerB. Test writes against a database with production-equivalent constraints.
AWhy not this: Production alerts detect rejected writes after deployment rather than preventing the release.
BWhy this is right: A representative database exposes incompatibilities between generated records and enforced destination constraints.
CWhy not this: Peer review helps identify defects but does not execute writes against the destination's constraints.
DWhy not this: Broader transformation coverage still misses destination behavior absent from the mocked writer.
Integration tests against production-equivalent constraints validate the boundary between generated records and the destination. More tests using the same mocked writer can still miss constraints the mock does not enforce.