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
CDC to Warehouse Data Parity
00:00
5 left

CDC to Warehouse Data Parity

HardSQL · PostgreSQL

Problem

Can you explain how you ensure data quality and parity consistency between change data capture (CDC) sources and a modern data warehouse?

Use the provided CDC event and warehouse customer tables to produce a reconciliation result. Consider the latest event for each customer and identify records that are not consistent between the two sources.

Output

  1. One row per parity exception, ordered by customer_id ascending.
  2. Return customer_id, source fields, warehouse fields, and parity_status.
  3. Include missing warehouse records, warehouse-only records, unapplied deletes, and field mismatches. Exclude fully matched records.

Schema

cdc_customer_events
ColumnTypeDescription
event_idPKINTUnique CDC event identifier
customer_idINTCustomer identifier from the source system
operationVARCHAR(20)CDC operation such as INSERT, UPDATE, or DELETE
customer_nameVARCHAR(100)Customer name included in the CDC payload
account_balanceNUMERIC(14,2)Account balance included in the CDC payload
account_statusVARCHAR(30)Account status included in the CDC payload
event_timestampTIMESTAMPTime at which the CDC event was recorded
warehouse_customers
ColumnTypeDescription
customer_idPKINTCustomer identifier in the warehouse
customer_nameVARCHAR(100)Customer name stored in the warehouse
account_balanceNUMERIC(14,2)Account balance stored in the warehouse
account_statusVARCHAR(30)Account status stored in the warehouse
Tablescdc_customer_eventswarehouse_customers
Interviewer

Your question is CDC to Warehouse Data Parity. Start with the requirements and the two 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.