Scrivio Interview library
ScenarioAdvanced7 min read · updated 12 November 2026

Ten services each expose a reporting replica, and analysts join data across them in spreadsheets. Leadership wants one source of truth. What do you propose?

I would propose one central warehouse or lakehouse fed by change data capture from each service, with conformed dimensions such as customer and product modelled once across all of them. Replicas stay, but only for operational read scaling, not for cross-service analytics. Access governance and personal data controls move to the central platform, and we deliver incrementally: start with the most-used reports, prove they match, and retire spreadsheets as each one is replaced.

Why this question is asked

Spreadsheets that join exports from ten databases are a sign that the company has outgrown its reporting setup. Each analyst copies data at a different time, matches customers by hand, and applies their own formulas, so two people answering the same question get different numbers, and nobody can say which is right. Personal data also ends up in files on laptops. Interviewers ask this scenario to see whether an architect can turn a messy situation into a target architecture and a realistic plan. In this answer, we will look at what the current setup costs, then lay out the target: centralised data through CDC, conformed dimensions, the new role of replicas, governance, and an incremental delivery plan.

1What the Current Setup Really Costs

Ten reporting replicas sound like a reasonable arrangement: each service exposes its data, analysts query what they need. The problems appear when a question spans services, which is most of the interesting ones. Revenue by customer segment needs orders from the order service, refunds from payments and segments from the CRM. With no place to join them, analysts export each to a spreadsheet and match rows by email or name.

That leads to familiar failures. Matching by email misses customers who changed address, so totals differ by a few percent between analysts. Exports are taken at different times, so a refund on Tuesday appears in one sheet and not the other. Each replica's schema changes with its service, silently breaking the queries behind the sheets. And copies of customer data sit in shared drives with no access control or deletion. Leadership asking for one source of truth is really asking to end all of these at once.

2Centralise the Data Through CDC

The target is one analytical store: a cloud warehouse, or a lakehouse with open table formats such as Iceberg on object storage. Each service's data reaches it through log-based change data capture, for example Debezium reading each database's WAL or binlog into Kafka and a loader writing the changes into a raw area. CDC is complete, including deletes, close to real time and light on the source databases, and it needs no new code in the services.

Raw data lands per service, unchanged and append-only. Transformation models, written in SQL with a tool such as dbt and kept in version control with tests, then build clean tables from it. Every analyst now queries the same tables, refreshed every few minutes, instead of ten replicas.

Step throughTarget architecture for one source of truth
  1. Dashboards and certified reportsreplace the spreadsheets
  2. Marts with conformed dimensionsone customer, one product, one date
  3. Transformation models with testsSQL in version control
  4. Raw area per serviceappend-only CDC data
  5. CDC from ten service databasesDebezium into Kafka
  6. Service databases and replicasreplicas for operational reads only

6 layers, from the top down. Step through them one at a time.

3Model Conformed Dimensions Across Services

Putting ten databases in one place is not enough: they still disagree about who a customer is. The core of the work is conformed dimensions, shared tables that every subject area uses with the same keys and meaning. dim_customer is built once by matching customers across services on stable identifiers, such as the account id the services share, with documented rules for merges, rather than each analyst's email matching. dim_product combines catalog data from the shop and inventory services. Fact tables from each service, such as orders, refunds and support tickets, all refer to these dimensions.

SQL
-- one customer dimension built from three services
CREATE TABLE marts.dim_customer AS
SELECT a.account_id AS customer_key,
a.email, a.country,
crm.segment, -- from the CRM service
bill.payment_terms -- from the billing service
FROM stg_accounts a
LEFT JOIN stg_crm_contacts crm ON crm.account_id = a.account_id
LEFT JOIN stg_billing_customers bill ON bill.account_id = a.account_id;
-- revenue by segment: no spreadsheets, one join
SELECT c.segment, SUM(f.net_amount)
FROM marts.fact_orders f JOIN marts.dim_customer c ON c.customer_key = f.customer_key
GROUP BY c.segment;

Where services have no shared identifier, building the matching is a project of its own, and it is better done once, centrally, with tests, than repeatedly in spreadsheets. Key metrics such as net revenue are then defined once on top of these tables and owned by named business owners.

4Keep Replicas for What They Are Good At

The replicas do not disappear. They remain useful for operational read scaling, letting a service serve heavy read traffic or run its own short operational queries without loading the primary. What changes is that cross-service analytics no longer runs on them. That removes long analytical queries from the replicas, which also ends the replay conflicts and lag those queries cause, and it frees each service team to change its schema without worrying about analysts' hidden queries, because the warehouse's models are the only consumers and are covered by tests.

5Govern Access and Personal Data Centrally

Moving data into one place makes governance easier, but only if we design it in from the start. Columns are classified when they land, personal data such as email, phone and address marked as such. Access is granted by role: most analysts see pseudonymised customer keys and aggregated data, while a small group with a business need sees personal fields, through masking policies in the warehouse. Deletion requests are applied centrally, in the raw area and in derived tables, which is impossible when customer data lives in hundreds of spreadsheets.

Part of the plan is a deliberate cleanup: as spreadsheets are replaced, the exported files with personal data are deleted from shared drives, and direct analyst access to the service replicas is withdrawn.

6Deliver Incrementally

A program like this fails if it disappears for a year and returns with a big launch. Instead, we deliver in slices that each replace something people use. First we find the ten or so most-used spreadsheets and reports, by asking analysts and looking at which replicas get queried most. For the first slice, we connect the three or four services those reports need, build the dimensions they use, and rebuild those reports in the warehouse. We run old and new side by side for a few weeks and reconcile the numbers, explaining every difference, which often reveals errors in the old spreadsheets. When the owners accept the new reports, the spreadsheets are retired.

Step throughReplacing spreadsheets slice by slice
  1. Find the most-used reportsinterviews and replica query logs
  2. Connect the services they needCDC into the raw area
  3. Build conformed dimensions and factswith tests
  4. Run old and new side by sidereconcile every difference
  5. Numbers accepted?
    YesRetire the spreadsheets, start next sliceNoFix the model and compare again

5 steps in order. Play them, or step through them one at a time.

Each slice adds services and dimensions, so the platform grows with real demand. Progress is measured in reports replaced, spreadsheets retired, and analyst hours saved, which keeps leadership's support through the months the full migration takes.

7Follow-up questions

Why CDC instead of nightly exports from each replica?

Nightly exports are simpler at first but miss deletes, depend on timestamps that not every writer maintains, and give day-old data. CDC captures every change from the log, is near real time, and puts little load on the services. For a few small sources, batch loads are still fine.

How do you handle a service whose data is very messy?

Its staging models do the cleaning, with tests that make the problems visible, and we raise the worst issues with the owning team. Messy data is not a reason to skip centralisation; it is easier to fix and document once than in every spreadsheet.

What if analysts keep using spreadsheets anyway?

Spreadsheets for exploration on top of certified data are fine. What we retire are spreadsheets that act as the source of truth. When the certified reports are faster and trusted, most people switch; for the rest, withdrawing direct replica access completes the move.

8Conclusion

In this answer, we replaced ten reporting replicas and cross-service spreadsheets with one source of truth. Data from every service flows by CDC into a central warehouse or lakehouse, conformed dimensions such as customer and product are modelled once with tests, replicas remain only for operational read scaling, access and personal data are governed centrally, and delivery happens slice by slice, starting with the most-used reports, reconciling old and new numbers, and retiring spreadsheets as they are replaced.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd propose a central warehouse or lakehouse fed by CDC from all ten services, so cross-service questions are answered in one place instead of spreadsheets. Debezium reads each database's log into Kafka, raw data lands unchanged per service, and SQL models with tests build clean tables.

Then, if they want more

The key piece is conformed dimensions. Today each analyst matches customers by email in a sheet, so totals disagree. Instead we build dim_customer and dim_product once, on stable identifiers, with documented merge rules, and every fact table from every service uses them. Metrics like net revenue are defined once on top, with named owners.

The replicas stay, but only for operational read scaling inside each service; analytics moves off them, which also ends their replay conflicts and frees teams to change schemas. Governance moves to the platform: personal data classified when it lands, masking and role-based access, deletion handled centrally, and the exported spreadsheets with customer data cleaned up. And I'd deliver incrementally.

Find the ten most-used reports, connect the services they need, rebuild them, run old and new side by side and reconcile the numbers, then retire those spreadsheets and move to the next slice. I'd report progress as reports replaced and spreadsheets retired.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Ten services each expose a reporting replica, and analysts join data across them in...": https://scrivio-interview-library.netlify.app/databases/analytics-and-cdc/61be63b585/