Data Governance, Contracts, and Classification Questions
Governing data at scale: data contracts between producers and consumers, schema evolution/compatibility, data classification and sensitivity tagging, access control, and lineage/cataloging. Covers policy, ownership, and compliance-driven controls over data. The governance layer over the technical stack.
New privacy rules restrict how long you can retain user-level identifiers and limit some of the analytics signals you used to rely on. Design a long-term analytics strategy that keeps the insights that matter (aggregated metrics, synthetic data, redesigned experiments) while staying within the new constraints, and be explicit about what you'd have to give up.
Sample Answer
Direct answer. Replace user-level tracking as the default data model with three complementary layers: aggregated metrics for steady-state reporting, synthetic data for exploratory and early model-development work that doesn't need a real individual, and experiments redesigned to run on cohort or session-scoped identifiers instead of a persistent user ID. Accept upfront that this costs you exact individual-level longitudinal history and some experiment power, and state that loss explicitly rather than presenting the new constraints as free.
Aggregated metrics. Move dashboards and steady-state reporting off row-level user data onto rollups computed at ingestion or in a batch job: daily and weekly counts, rates per cohort, funnel step counts, with a minimum group-size floor before a cell is allowed to render (a k-anonymity floor, meaning any published number must represent at least k distinct users so small groups aren't re-identifiable). Keep the rollup definitions and transformation code long after you stop keeping the source rows, so metrics stay reproducible even after the raw retention window expires.
Synthetic data. For exploratory analysis and early model prototyping, generate a synthetic dataset that preserves the statistical structure (distributions, correlations) of the real data with no row mapping back to a real individual. This is for iteration speed, not for final reporting; anything that ships a number to a decision-maker should trace back to real aggregates, not synthetic output, because a generator can miss a correlation that matters.
Redesigned experiments. Where the old design needed a persistent user ID to track someone across sessions for weeks, redesign to session- or cohort-level randomization: randomize by device or session for short-horizon effects, or by a coarser unit (a geographic cell, a cohort defined by signup week) when a longer observation window is needed without keeping a persistent identifier. Where a persistent-but-ephemeral key is unavoidable to keep the same user in the same arm, use a rotating pseudonymous ID with a retention window matched to the experiment's maximum duration, not indefinite.
What you have to give up
- Exact user-level longitudinal history: retrospective, individual-level questions ("what did this specific user's path look like over three years") become answerable only at cohort granularity going forward.
- Small-segment visibility: the minimum-group-size floor means niche or rare segments may be suppressed or carry wider uncertainty, because there aren't enough distinct users to safely publish a cell.
- Statistical power per unit of sample: cluster-randomized experiments have less power at the same underlying population size, because the effective sample size is the number of independent clusters, not the number of users inside them.
- Confidence in synthetic-only findings: any decision made purely off synthetic exploration, without confirming against real aggregates, carries a small but real risk the generator missed something that mattered.
Worked example (illustrative, not a measured result). Suppose the old design ran an individual-level test with 100,000 independent users per arm. If regulation now forces cohort-level randomization by signup week with an average cohort size of 500 users, the effective number of independent units drops to roughly 100,000/500 = 200 clusters per arm, even though the same 100,000 underlying users are represented, because clusters, not users, are now the unit of independence. Two hundred clusters is a far smaller effective sample than 100,000 users, which is exactly why a cluster-randomized design needs either more calendar time or a larger minimum detectable effect than the equivalent individual-level test run for the same duration.
Trade-offs and pitfalls
- The common wrong turn is announcing "we've moved to aggregates" without naming the concrete capability lost; stakeholders find out the hard way when they ask a question the new model can no longer answer.
- Building a synthetic-data generator is real, ongoing work with its own validation burden; treating it as a quick swap-in for real data underestimates the lift.
- Retrofitting redesigned experiments onto product surfaces that assumed a persistent user ID in the client SDK is usually the longest pole, not the analytics math.
You're asked to stand up a data-stewardship program from scratch across a few product or business domains. How would you identify and recruit the first stewards, what would their actual day-to-day responsibilities be, how would you onboard them over the first couple of months, and what KPIs would tell you the program is working rather than just existing on paper?
Sample Answer
Direct answer. Start by identifying the domains with the highest data-quality pain or highest business criticality, recruit stewards from within those domains rather than hiring new people, give them a small, concrete set of recurring responsibilities instead of an open-ended mandate, run a structured onboarding over the first couple of months, and track KPIs (key performance indicators) that measure actual behavior change, issues resolved, datasets documented, rather than just program existence, stewards named, kickoff held.
Identifying and recruiting the first stewards
- Prioritize domains by a combination of business criticality and current pain: datasets feeding executive reporting or revenue-critical pipelines with a history of quality incidents are strong first candidates, since success there is visible and the need is already felt.
- Recruit from people already doing informal stewardship: the analyst everyone already asks about a table's quirks, or the engineer who already fields "why does this number look wrong," is usually the right person, since the program formalizes and supports existing behavior instead of assigning it cold.
- Get their manager's explicit buy-in on time allocation before asking the individual; stewardship without a manager-sanctioned time carve-out becomes something done only when nothing else is on fire.
Day-to-day responsibilities
- Triage and respond to data-quality alerts for datasets in their domain within a defined response window.
- Review and approve schema or definition changes proposed by producing teams in their domain.
- Maintain documentation, field definitions, known caveats, freshness expectations, for their domain's key datasets.
- Serve as the point of contact for access requests and use-case questions specific to their domain's data.
Onboarding over the first couple of months
- Weeks 1-2: kickoff and role definition. The steward gets a written charter (scope, authority, time commitment), access to the catalog and monitoring tooling, and a walkthrough of their domain's current dataset inventory and known issues.
- Weeks 3-6: shadowing and paired work. The steward handles their first few quality alerts and access requests with support, building confidence before going solo.
- Weeks 7-8: independent operation with a check-in cadence, for example a biweekly sync to surface blockers, plus an initial documentation pass on the domain's top datasets.
- End of month 2: a baseline review comparing the domain's state, documentation coverage, open quality issues, against the pre-program baseline captured at kickoff, so the KPI trend has a real starting point.
KPIs that show the program is working, not just existing on paper
- Documentation coverage: percentage of the domain's key datasets with an owner, a steward, and a current field-level description, tracked as a trend, not a one-time snapshot.
- Time-to-acknowledge and time-to-resolve for data-quality alerts in the domain, compared against the pre-program baseline.
- Steward-initiated actions, definition changes approved, access requests handled, as a count over time, which distinguishes an active steward from a named-but-inactive one.
- A specifically easy-to-fake leading indicator worth watching: attendance at steward syncs and charter sign-off are necessary but not sufficient. If those are the only things tracked, the program can look healthy, stewards named, meetings held, while the metrics above stay flat, which is exactly the "existing on paper" failure mode.
Trade-offs and pitfalls
- Recruiting stewards without securing manager-sanctioned time is the single most common way these programs quietly fail; the role gets a title and no bandwidth, and the first fire in someone's actual job displaces it.
- Choosing KPIs that measure program activity instead of program outcome is exactly how a program can look successful in a status update while doing nothing.
- Standing up too many domains at once dilutes the support available to each new steward during onboarding; starting with one or two high-value domains and expanding once the model is proven is more durable than a simultaneous organization-wide rollout.
What is a data contract between a data producer and its consumers, and what does it typically specify (schema, semantics, freshness or SLA, ownership, compatibility rules)? Explain why teams that publish or consume shared datasets or event streams benefit from having one, even an informal one.
Sample Answer
A data contract is an explicit, versioned agreement between the team that produces a dataset or event stream and the teams that consume it, specifying what the data looks like and how it is allowed to change, so consumers can build on it without watching the producer's code. It moves the schema from an implicit "whatever the table currently contains" to a documented interface, the same way an API contract does for a service boundary.
What a data contract specifies
- Schema: the field names, types, nullability, and structure of the dataset or event.
- Semantics: what each field actually means (for example, is
amountpre-tax or post-tax, isuser_idinternal or external). - Freshness or SLA (service-level agreement): how often new data lands and by when (for example, "table refreshed daily by 6am UTC" or "event latency at the 95th percentile under 5 minutes").
- Ownership: who to contact, who approves changes, who gets paged if it breaks.
- Compatibility rules: what kind of changes are allowed without notice (adding an optional field) versus what requires a migration (renaming or removing a field, changing a type).
Where this shows up for ML features specifically
When the "dataset" is a feature powering a model, the contract checklist picks up a few ML-specific fields on top of the general ones: the feature's computation logic (so training and serving compute it identically), a point-in-time correctness guarantee (no leakage of future data into a training example), a PII (personally identifiable information) or sensitivity flag, and an owner responsible for backfills when the definition changes. Feature stores often store these as machine-readable metadata alongside the feature itself.
Why teams benefit, even from an informal one
Without any contract, consumers reverse-engineer the current shape of a table or event and build against it implicitly; the producer has no idea who is downstream, so a "harmless" rename breaks three pipelines nobody warned. A contract, even a one-page document naming the fields, semantics, freshness, and an owner, converts that into an explicit interface: the producer knows who to notify before a change, consumers know what they can safely rely on, and disputes over "was this expected" get resolved by pointing at a written agreement instead of chat-history archaeology. Contracts also make governance easier, because who owns which sensitive field is written down rather than tribal knowledge.
How this actually gets adopted across teams
A contract that lives only in a wiki page decays quickly. What makes it stick is treating it as an artifact next to the code: check it into the same repository as the producing pipeline, version it, and, once the culture is ready, turn its compatibility rules into an automated CI (continuous integration) check on the producer's build so a breaking change fails the build instead of failing in a downstream dashboard three weeks later. Cross-team adoption grows from a few high-traffic, high-incident datasets first, not a company-wide mandate on day one.
Worked example
A orders.order_placed event contract might read:
event: orders.order_placed
owner: checkout-team (#checkout-eng)
schema:
order_id: string (required)
user_id: string (required)
amount_cents: integer (required) # semantics: total charged, in cents, post-discount, pre-tax
currency: string (required, ISO 4217 code)
placed_at: timestamp (required, UTC)
freshness: emitted within 2 seconds of order placement (95th percentile)
compatibility: backward-compatible only; new fields must be optional; no field renames or type changes without a version bump
A downstream fraud-scoring pipeline reads amount_cents and currency from this contract. If checkout later wants to add a discount_cents field, the compatibility rule says that is fine as an optional addition, but changing amount_cents to represent a pre-tax amount would violate the stated semantics and requires a notified migration, not a silent change.
Trade-offs and pitfalls
Writing and maintaining a contract has real overhead, and for a low-traffic, single-consumer dataset a full formal contract can be more process than the risk warrants; an informal one (a short document with an owner and the five elements above) captures most of the value at a fraction of the cost. The common pitfall is writing the document once and never enforcing it: a contract nobody checks against reality is worse than none, because consumers trust it and get burned when the real data has drifted from what is written. The fix is pairing the contract with even a lightweight CI check, not just a policy page.
What is a data catalog, and what metadata should it capture for a dataset (technical: schema, refresh cadence, lineage; business: definitions, owner, sensitivity classification)? Why does this matter for a data engineering or analytics organization beyond being 'nice to have' documentation, and what's the minimum viable set of catalog capabilities you'd prioritize first at a small organization versus a mature one?
Sample Answer
Direct answer
A data catalog is a searchable inventory of an organization's datasets that records both technical metadata (schema, refresh cadence, lineage) and business metadata (definitions, owner, sensitivity classification) in one place, so someone deciding whether to use a dataset does not have to ask around or read pipeline code to find out. It matters beyond being documentation because it is the mechanism that makes trust, access control, and consistent metric definitions actually operable at scale, not just written down somewhere.
Structured elaboration
Technical metadata answers "what is this dataset, mechanically": its schema (field names and types), how often it refreshes, and its lineage (what feeds it, what it feeds). This is largely derivable automatically from the systems that produce the data.
Business metadata answers "what does this dataset mean, and can I use it": a plain-language definition of what each field represents, a named owner to contact with questions, and a sensitivity classification (public, internal, confidential, restricted, or a similar scheme) that determines who is allowed to access it and under what controls. This typically requires a human who understands the business context to curate.
Why it is more than "nice to have" documentation. A wiki page describing a dataset can go stale the moment the pipeline changes, and nobody is forced to notice. A catalog earns its keep when it is load-bearing for something else: access control systems read the sensitivity tag to decide who can query a table, onboarding new analysts is faster because search replaces asking a colleague who happens to remember, and impact analysis before a schema change is possible because lineage is captured, not just described. Documentation that nothing else depends on tends to rot; a catalog that other systems and workflows actually consume has a reason to stay current.
Minimum viable catalog, small organization. At a handful of analysts and a single warehouse, the highest-value minimum is: one place (even a well-maintained spreadsheet or a lightweight open-source tool) listing each table's owner, a one-line business definition, and its sensitivity classification. Automated schema and lineage capture is valuable but not the first thing to invest in, the organization is small enough that "ask the two people who touch this table" still mostly works; the catalog's first job is making ownership and sensitivity explicit before that informal knowledge walks out the door with an employee.
Minimum viable catalog, mature organization. At the scale of hundreds of datasets across multiple teams, manual maintenance breaks down, so the priority flips: automated harvesting of technical metadata and lineage becomes necessary just to keep the catalog accurate, search and discovery need to be genuinely fast and relevant (not just a list), and the sensitivity classification needs to be enforced by the access-control system rather than being informational text a human is trusted to read.
Worked example
Consider a fifteen-person startup with one warehouse and thirty tables. A lightweight catalog entry for the orders table might be: owner = the payments team lead by name, definition = "one row per completed checkout, excludes abandoned carts," refresh cadence = "hourly," sensitivity = "internal" (no raw payment card data, that lives in a separate restricted table). That is enough for a new analyst to trust the table without pinging anyone, and it took minutes to write, not a dedicated project.
Trade-offs & pitfalls
The most common failure mode at any scale is treating cataloging as a one-time documentation sprint rather than an ongoing, mechanically-enforced practice, the catalog is accurate on launch day and stale within a quarter once nobody is required to update it as pipelines change. A small organization that over-invests in automated lineage tooling before it has thirty tables is solving a scale problem it does not have yet, at the cost of time better spent elsewhere. A mature organization that relies on manual updates for sensitivity classification, rather than deriving and enforcing it automatically where possible, will have a catalog that looks complete but cannot actually be trusted to gate access correctly.
Leadership wants a data governance policy that restricts PII access for ML teams without meaningfully slowing down experimentation. Propose a governance model (roles, policy enforcement points, automated classification, a dataset-onboarding flow) that achieves both, and describe a concrete trade-off you had to navigate on a real project where governance and experimentation velocity pulled in different directions.
Sample Answer
Direct answer. Solve this with a model that front-loads governance work into a one-time dataset-onboarding flow with automated classification, so day-to-day experimentation runs against pre-approved, pre-classified data through defined policy enforcement points, rather than requiring a manual review on every experiment. The roles, automation, and enforcement points exist so the friction happens once per dataset, not once per experiment.
Roles
- Data owner: the business or domain owner accountable for a dataset's appropriate use, approving what it may be used for.
- Data steward: enforces classification and access policy day to day, reviewing the edge cases the automated classifier flags with low confidence.
- Platform and governance engineering: builds and maintains the enforcement tooling, the catalog, and the automated classifier.
- ML (machine learning) practitioner, the consumer: requests access through the defined flow but shouldn't need a human in the loop for the common case.
Policy enforcement points
- Ingestion: automated classification runs as data lands, tagging sensitivity before anyone can query it.
- Catalog and access request: a dataset's tag determines what access tier is available, and whether it's self-serve or requires steward approval.
- Compute and serving: at query or training-job time, the access-control layer enforces the granted tier, for example a masked or aggregated view rather than the raw table.
- Egress and model artifact: a check before a trained model or extracted feature set leaves the controlled environment, since a model trained on PII (personally identifiable information) can itself leak information about the training data.
Automated classification. A scanner combining schema-based rules with a lightweight content classifier for patterns like email-shaped or national-ID-shaped strings runs on every new or changed dataset and assigns a sensitivity tag automatically. Only low-confidence or newly-seen-pattern cases route to a human steward, which is what keeps review from becoming a bottleneck as the number of datasets grows.
Dataset-onboarding flow
- The producer registers a new dataset in the catalog with a schema.
- The automated classifier tags each field's sensitivity.
- The data owner reviews and confirms the tags, fast, since most are automated and correct.
- Access tiers generate automatically from the tags, for example raw restricted to steward-approved access only, a masked view self-serve for any ML practitioner, and an aggregate view fully open internally.
- From that point on, an ML practitioner requesting access is routed to the right tier automatically, self-serve for anything that doesn't require a raw-PII grant.
Worked example: a real project's trade-off (story skeleton, qualitative, no fabricated precision). On a project I worked on, an ML team needed a customer support transcripts dataset to train a text classifier, and transcripts routinely contained names, account numbers, and sometimes payment details typed by frustrated customers. The prior process required a manual privacy review for every new experiment that touched the dataset, which meant a multi-day wait each time someone wanted to try a new feature. We changed the enforcement point: instead of reviewing every experiment, we built an automated scrubber that ran once at ingestion, producing a redacted version alongside the raw version. The redacted version became the self-serve default tier for any ML practitioner; the raw version stayed steward-gated for the rare case, usually debugging a scrubber miss, that genuinely needed it. The trade-off we had to navigate: the redacted tokens degraded model quality on tasks where the exact entity mattered, for example an intent classifier that only needed to notice "asked about a specific account" as a category, which the token preserved, versus a task that needed the actual account number, which the token no longer exposed. We resolved it by keeping the raw-access path available but gated rather than declaring the redacted version universally sufficient, and by checking model quality on the redacted-only pipeline before assuming it was good enough for a given task, rather than after shipping.
Trade-offs and pitfalls
- Over-indexing on automation without a human review path for low-confidence classifier output means new or unusual data shapes get silently mis-tagged; the automation has to know when to defer to a steward, not replace one.
- Treating the redacted or masked tier as automatically "good enough" for every ML task is the most common wrong turn; some tasks genuinely need the raw signal, and the governance model needs a real, if slower, path to get it, not a permanent no.
- The one-time onboarding cost is a real cost, not a free lunch; if the organization treats onboarding as optional, every dataset stays stuck in the slow, manually-reviewed path and experimentation velocity never actually improves.
Unlock Full Question Bank
Get access to all 41 Data Governance, Contracts, and Classification interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.