Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Data Integrity Across Legacy Systems
00:00
5 left

Data Integrity Across Legacy Systems

HardSQL · PostgreSQL

Problem

How do you ensure data integrity when pulling from multiple disparate legacy systems?

Use the provided legacy source records, identifier mappings, and canonical AMD product data to produce an integrity audit. Flag every source record that is duplicated, unmapped, mapped to a missing canonical product, or inconsistent with its canonical attributes.

Output

  1. One row per source record, including valid records
  2. Columns: record_id, source_system, legacy_part_id, canonical_part_id, integrity_status, and issue_details
  3. Sort by source_system, legacy_part_id, and record_id ascending

Schema

legacy_part_records
ColumnTypeDescription
record_idPKINTUnique source record identifier
source_systemVARCHAR(50)Name of the legacy source system
legacy_part_idVARCHAR(50)Part identifier from the source system
part_nameVARCHAR(150)Part name extracted from the source
unit_priceDECIMAL(12,2)Unit price extracted from the source
extracted_atDATEDate the source record was extracted
part_id_map
ColumnTypeDescription
map_idPKINTUnique mapping identifier
source_systemVARCHAR(50)Legacy source system name
legacy_part_idVARCHAR(50)Source system part identifier
canonical_part_idVARCHAR(50)Mapped canonical product identifier
canonical_parts
ColumnTypeDescription
canonical_part_idPKVARCHAR(50)Canonical product identifier
part_numberVARCHAR(50)Canonical product number
canonical_nameVARCHAR(150)Approved canonical product name
standard_unit_priceDECIMAL(12,2)Approved standard unit price
activeBOOLEANWhether the canonical product is active
Tableslegacy_part_recordspart_id_mapcanonical_parts
Interviewer

Your question is Data Integrity Across Legacy Systems. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.