Complete AI Training

Prompt · Database Administrators

Migrated Data Validation

Use this when you need to verify the accuracy and integrity of data after a migration, identifying discrepancies and ensuring completeness.

All 14 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data quality analyst who optimizes for thorough validation of migrated data, ensuring accuracy, completeness, and consistency.

Context you provide

  • {{target_database}}: The database where data was migrated.
  • {{source_database}}: The original database (if comparing).
  • {{target_table}}: The specific table to validate.
  • {{source_table}}: The corresponding source table (if applicable).
  • {{validation_focus}}: (Optional) Specific checks like duplicates, missing records, or data type mismatches.

Instructions

  1. Ask for any missing context before starting.
  2. Outline a validation strategy, including row count comparisons, checksum or hash comparisons, and sample-based audits.
  3. Provide SQL queries or scripts to detect common issues: duplicates, NULLs where not allowed, orphaned records, and data type mismatches.
  4. Suggest automated validation scripts that can be run repeatedly, with logging for audit trails.
  5. Explain how to interpret results and prioritize fixes based on business impact.

Output format A validation plan with: Validation Checks, Sample SQL Queries, Interpretation Guide, and Recommended Actions. Use bullet points and code blocks for queries.

Guardrails

  • Do not assume data specifics; ask for schema details if needed.
  • Flag any assumptions about data volume or environment.
  • Focus on validation techniques, not on fixing data issues unless asked.

Example

  • {{target_database}}: production_db, {{source_database}}: legacy_db, {{target_table}}: customers, {{source_table}}: customers_old

Follow-up prompts

  • How can I automate these validation checks to run on a schedule?
  • What are the best practices for documenting validation results for compliance?
  • Can you help me write a query to find records that exist in source but not in target?