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.
A key metric (say, a revenue number) is derived from data contributed by several different teams (sales, billing, product events), and it's genuinely unclear who owns it. Design a governance model that assigns ownership for a derived metric like this: how is the owner chosen, who approves a definitional change, and how are conflicting change requests from the different contributing teams resolved?
Sample Answer
For a derived metric fed by multiple teams, ownership should sit with a single accountable role, not a committee, chosen by who has the authority and incentive to defend the metric's definition against pressure from any one contributing team; every contributing team keeps input rights over the pipeline stages they control, but only the owner can approve a definitional change.
How the owner is chosen
The owner should be whichever function is most directly accountable for the METRIC's business meaning, not the team that happens to run the pipeline that computes it. For a revenue number touched by sales, billing, and product events, that's typically finance or a dedicated analytics/BI (business intelligence) function reporting to finance, because they're the ones who have to defend the number externally (to the board, to auditors) and have no structural incentive to bias the definition toward any single contributing team's convenience. Sales, billing, and product remain the owners of their OWN upstream data (their event schemas, their table freshness), but not of the derived metric's definition.
Who approves a definitional change
A single named owner approves, but approval requires a documented review with the contributing teams, not a unilateral decision made in isolation:
- Proposal. Anyone, including a contributing team, can propose a change (for example, "should refunds net against revenue in the same period or the period they occurred"), with a written rationale and the concrete impact on historical numbers if the definition changes.
- Impact review. The owner runs the proposed definition against a recent time window and shows contributing teams the delta, so nobody is surprised by a retroactive restatement.
- Owner approval and versioning. The owner approves or rejects, and an approved change is versioned (metric v2, effective date), never silently overwritten, so historical reports remain reproducible against the definition that was live when they were produced.
Resolving conflicting change requests
When sales wants one definition and billing wants a conflicting one, the owner's job is to resolve it against the metric's stated PURPOSE, not by splitting the difference or picking whoever asked first. In practice: the owner convenes the requesting teams, makes each state the business question their preferred definition answers, and picks the definition that best serves what the metric is actually used for (a revenue number reported to the board should follow the definition an auditor would recognize, not the one that is most flattering to whichever team escalated loudest). If the conflict reveals that two teams actually need two DIFFERENT metrics (gross bookings versus recognized revenue, for instance) rather than one contested definition, the right resolution is to name and publish both as separate, clearly-labeled metrics instead of forcing a single number to serve two purposes.
Trade-offs and pitfalls
The common failure mode is ownership by committee, where every contributing team gets a veto; this produces paralysis on any change that benefits one team at another's expense, and in practice the loudest or most senior team's preference wins by default anyway, just without the transparency of a documented decision. Naming a single accountable owner with a documented, versioned approval process avoids that while still giving contributing teams real input through the impact-review step. The other pitfall is choosing the owner by who currently RUNS the pipeline rather than who is accountable for the metric's meaning; a data engineering team that owns the ETL (extract, transform, load) job is often not positioned to adjudicate a business definitional dispute between sales and billing, even though they're the ones who'd get pulled into the argument by default.
A team member who owned a set of important dashboards or datasets is leaving. Design a handoff process: what documentation and knowledge-transfer sessions are required, who takes temporary ownership, what access needs to change, and what checkpoints ensure nothing quietly breaks a month later when nobody remembers who to ask.
Sample Answer
Direct answer. Treat the departure as a forced deadline for something that should already be documented: assign a named temporary or permanent owner immediately rather than leaving it unassigned, run structured knowledge-transfer sessions before the departure date rather than relying on an exit interview, rotate every credential and access grant tied to that person, and schedule specific checkpoints after departure rather than assuming silence means success.
Documentation and knowledge-transfer sessions
- Have the departing owner produce, or validate if partial documentation already exists, a handoff document covering what each owned dashboard or dataset does and for whom, the data sources and any non-obvious transformation logic, known quirks or workarounds, the on-call or support pattern, and a list of scheduled jobs or automations tied to their account.
- Run at least one live walkthrough session with the incoming owner, not just a written document. A session surfaces the "oh, and one more thing" details that never make it into a doc written under deadline pressure, and lets the incoming owner ask questions while the source is still available.
- Record or take detailed notes during the session specifically for anything time-sensitive or judgment-based, for example a metric definition under active dispute with another team, since that's exactly the kind of context that's easy to lose and hard to reconstruct later.
Who takes temporary ownership. Assign a specific named person, not "the team," before the departure date, ideally someone who attended the knowledge-transfer session and has some existing context. If no one has context, temporary ownership defaults to the departing owner's manager or team lead as the accountable party, even if they delegate the day-to-day work, so there's always one name responsible.
What access needs to change
- Rotate or reassign any service-account credentials, API keys, or scheduled-job authentication running under the departing owner's personal identity, a common source of "quietly breaks a month later" incidents, since a personal account's access often silently continues working until it's deprovisioned, at which point everything tied to it fails at once.
- Grant the incoming owner the access levels actually needed to operate, not a blanket copy of the departing owner's full access, which is often broader than the role strictly requires.
- Revoke the departing owner's access on their actual last day, coordinated with IT or security offboarding, and confirm nothing was missed by checking for any resource still showing them as owner or admin.
Checkpoints ensuring nothing quietly breaks a month later
- Week 1 post-departure: confirm every scheduled job or pipeline that was tied to the departing owner's credentials ran successfully at least once under the new ownership.
- Weeks 2-4: the incoming owner handles a live incident or support question independently, or with light backup, as a practical test of whether the knowledge transfer actually took, rather than assuming it did because the sessions happened.
- 30-day checkpoint: an explicit review meeting confirming the handoff document is accurate against what was actually learned in the first month, closing out any open items from the original transfer.
- A calendar reminder, not memory, should own this cadence; the checks happen on schedule regardless of whether anything visibly went wrong, since the failure mode is exactly the quiet break nobody notices until it's overdue.
Worked example. A departing analyst owned 6 dashboards and 2 scheduled data pipelines that ran under their personal warehouse credentials. The handoff document lists all 8 assets with their data sources and known quirks; a 90-minute walkthrough session covers each; the incoming owner is assigned before the last day; the 2 pipelines are migrated from the departing analyst's personal credentials to a shared service account in the week before departure, not after, so any breakage from the migration is caught while the departing analyst can still help; access is revoked on the last day; and at the week-1 checkpoint, both pipelines are confirmed to have run successfully under the new service account.
Trade-offs and pitfalls
- The most common mistake is leaving scheduled jobs running under the departing person's personal credentials past their last day, which fails silently, running fine right up until credentials are revoked, then breaking all at once, often days or weeks after everyone's attention has moved on.
- Assigning temporary ownership to "the team" instead of one named person means the 30-day checkpoint has no one clearly accountable to run it, and it quietly doesn't happen.
- Treating the walkthrough session as optional when documentation already exists underestimates how much undocumented judgment, why a metric is defined the odd way it is, which stakeholder actually cares about which number, lives only in the departing owner's head.
Design a lightweight data governance policy for a mid-size company: what would it cover (data ownership, schema-change approvals, PII tagging, lifecycle and retention), and how would you operationalize it so it's enforced by tooling rather than relying on people remembering to follow a wiki page?
Sample Answer
Direct answer
A lightweight governance policy for a mid-size company should cover four areas: data ownership, schema-change approvals, personally identifiable information (PII) tagging, and lifecycle and retention. To make it stick, encode each one as a check that tooling enforces automatically (a pipeline blocked from deploying, a table blocked from being created) rather than a rule written on a wiki page that depends on people remembering to follow it.
Structured elaboration
Data ownership. Every dataset has a named owner, recorded in the catalog at creation time, not added later if someone asks. Operationalize it by making the owner field a required, non-empty field in the dataset-creation tooling (a table creation script or Terraform module that will not run without it), rather than a policy statement that ownership "should" be recorded.
Schema-change approvals. A breaking schema change (removing a field, tightening nullability, changing a type) requires review before it ships, while an additive, backward-compatible change (adding a new nullable field) can go through automatically. Operationalize it with a CI check that classifies the change (breaking versus additive) by diffing the new schema against the previous one, and only routes breaking changes to a required human approval step, so the policy is enforced by the pipeline, not by hoping the engineer remembers to ask.
PII tagging. Any field containing personally identifiable information (PII), directly identifying (name, email) or indirectly identifying in combination with other fields, is tagged as such in the catalog, and that tag drives masking or access restriction automatically. Operationalize it with an automated PII-detection scan (pattern matching on column names and sampled values) that runs on every new table and flags likely PII for a human to confirm, rather than relying on the table's creator to remember to self-report it.
Lifecycle and retention. Every dataset has a stated retention period, driven by its sensitivity classification and any PII it contains, after which it is automatically archived or deleted. Operationalize it with a scheduled job that reads the retention field from the catalog and acts on it, rather than a policy that retention "should" be respected with no automated enforcement.
Worked example
A new table, signup_events, is created. The creation tooling requires an owner field (the growth team lead is entered) before the table can be provisioned at all. The automated PII scan flags the email column as likely PII based on its name and sampled values; a human confirms it, and the catalog tags the column, which triggers an automatic column-level masking policy for any role without an explicit PII-access grant. Because the table contains PII, its default retention (driven by the sensitivity/PII policy) is set to 18 months rather than the standard non-PII default of 5 years, and a scheduled job will archive rows past that age without anyone needing to remember to run a manual cleanup.
Trade-offs & pitfalls
Automated PII detection based on column names and sampled values produces both false positives (a column named user_ref that is actually an internal, non-identifying ID) and false negatives (a free-text notes field that occasionally contains a customer's name typed in by a support agent, which pattern matching on the column as a whole will likely miss), so it needs a human-review step, not full automation, and the review step is exactly where deadline pressure tends to erode the policy if it becomes a bottleneck. Schema-change classification (breaking versus additive) can also misjudge a case where an additive-looking change actually breaks a downstream consumer's business logic even though it does not break the schema mechanically, tooling catches structural breakage, not semantic breakage. And a retention policy enforced by a scheduled deletion job is unforgiving of a mistake, if a dataset is mis-tagged as containing less-sensitive data than it does, the shorter automated deletion the mis-tag implies can be the safer failure mode, but a longer-than-intended retention on genuinely sensitive data is the more dangerous one, so retention defaults should err conservative when tagging confidence is low.
At a mid-size company, what are the core components of a data-governance program relevant to data engineering (ownership and stewardship, metadata and cataloging, access control and RBAC, PII discovery and handling, SLAs, data contracts, and policy enforcement across pipelines)? If you were starting from nothing, what would the first few practical steps actually be?
Sample Answer
For data engineering specifically, a governance program has seven interlocking components: ownership and stewardship, metadata and cataloging, access control and RBAC (role-based access control), PII (personally identifiable information) discovery and handling, SLAs (service-level agreements), data contracts, and policy enforcement across pipelines. None of them work well in isolation; ownership without a catalog is unfindable, a catalog without enforcement is decorative, and starting from nothing means sequencing these deliberately rather than trying to stand up all seven at once.
The core components
- Ownership and stewardship: every dataset with downstream consumers has a named owning team, accountable for its quality, its schema, and responding when something breaks. Stewardship is the operational half: someone actively maintains the dataset's documentation and fields incident triage, distinct from formal ownership which is about accountability.
- Metadata and cataloging: a searchable inventory of what data exists, who owns it, what it means, and how it's classified, so "where do I find X" and "who do I ask about Y" have a documented answer instead of requiring institutional memory.
- Access control and RBAC: access to data is granted by role (analyst, engineer, data scientist) mapped to what that role legitimately needs, rather than ad hoc individual grants that accumulate and are never revisited.
- PII discovery and handling: an active process (automated scanning plus manual review for what scanning misses) to know which fields and tables contain personal data, and documented handling rules for each (masking, restricted access, retention limits) tied to what regulation actually requires.
- SLAs: documented, measurable commitments about a dataset's freshness, completeness, and availability, so consumers know what they can rely on and producers know what they're accountable for.
- Data contracts: the schema-and-semantics agreement between a data producer and its consumers, versioned, so a breaking change is a deliberate, communicated decision rather than a silent accident.
- Policy enforcement across pipelines: the mechanism (automated checks in CI/CD (continuous integration/continuous deployment), a policy engine, quality gates) that actually makes the above real, rather than aspirational documentation nobody checks against.
How they relate
flowchart TD
O[Ownership and stewardship] --> C[Metadata and cataloging]
C --> A[Access control and RBAC]
C --> P[PII discovery and handling]
O --> S[SLAs]
O --> D[Data contracts]
S --> E[Policy enforcement across pipelines]
D --> E
P --> E
Ownership is the root: it's the precondition for everything else having a clear accountable party. The catalog makes ownership and classification discoverable. Access control and PII handling both depend on knowing what's sensitive, which the catalog and its classification metadata provide. SLAs and contracts are the concrete promises owners make; policy enforcement is what turns those promises into something checked automatically rather than trusted on faith.
Starting from nothing: the first practical steps
- Inventory and assign ownership first, even before building any tooling. A spreadsheet mapping each significant dataset to an owning team is a legitimate starting point; the goal is closing the single biggest gap (unowned data) cheaply before investing in infrastructure.
- Stand up a lightweight catalog, even a simple one, populated from the ownership inventory plus whatever metadata is already sitting in existing tools (a dbt project's generated docs, a warehouse's information schema). Don't wait for a full enterprise catalog product; a searchable, if basic, inventory beats a perfect one that ships in a year.
- Run a PII discovery pass on the highest-risk datasets first (anything touching customer data, payment data, or health data), not the whole warehouse at once; automated scanning tools flag likely PII fields for a human to confirm and classify.
- Write data contracts for the highest-fan-out datasets, the handful of tables or event streams the most other pipelines depend on, since that's where an uncommunicated breaking change causes the most damage.
- Only then build policy enforcement into CI/CD, once there's something real (contracts, classification tags, ownership metadata) to actually enforce; automating enforcement of policies that don't exist yet just automates nothing.
Trade-offs and pitfalls
The common wrong turn starting from nothing is buying an enterprise catalog or governance platform first and expecting the org to populate it; without ownership already assigned, the tool sits empty, because nobody's job is to fill it in. The other pitfall is trying to enforce policy (gate 5) before the earlier steps exist; a CI check that fails a build because a table "isn't classified" is worse than useless if there's no catalog to classify it IN and no owning team to fix it.
You're responsible for classifying the sensitivity of columns in a shared CRM dataset (say, contacts and accounts tables) and setting access policy for several internal roles with different needs. Design a classification scheme, a column-level access policy per role, and a masking or tokenization approach for anyone exporting the data. What's the trade-off between tightening this and keeping the sales and analytics teams productive?
Sample Answer
Classify CRM columns by what they reveal, grant access per role against that classification rather than per table, and mask or tokenize on export by default so leaving the platform is never the path of least resistance for raw PII (personally identifiable information).
Classification scheme for the CRM columns
Using contacts and accounts tables as the concrete example:
| Tier | Example columns | Rationale |
|---|---|---|
| Restricted | contacts.ssn_or_tax_id, contacts.date_of_birth, accounts.bank_account_number | direct identifiers or financial instruments; high harm if exposed |
| Confidential | contacts.email, contacts.phone, accounts.annual_revenue, accounts.deal_value | personal contact info and competitively sensitive business data |
| Internal | contacts.account_id, contacts.lead_source, accounts.industry, accounts.territory | useful for business operations, low harm if seen broadly inside the company |
Column-level access policy per role
| Role | Restricted columns | Confidential columns | Internal columns |
|---|---|---|---|
| Sales rep (own accounts) | No access | Full access, own assigned accounts only (row-level filter) | Full access |
| Sales manager | No access | Full access, own team's accounts | Full access |
| Analytics / BI | No access | Masked (for example last-4-digits of phone, domain-only email) unless a specific approved analysis needs raw values | Full access |
| Finance | Access to bank_account_number only, no other restricted fields | Full access | Full access |
| Data platform admin | Audited emergency access only, logged and time-boxed | Full access | Full access |
The row-level filter for sales reps ("own assigned accounts only") is enforced the same way as the column policy: as a predicate attached to the underlying table or a secure view, not as a client-side filter the reporting tool could be misconfigured to skip.
Masking or tokenization for exports
Any export (a CSV download, a scheduled report to an external tool, an API pull) goes through a masking layer by default:
- Confidential columns default to masked on export. Email becomes domain-only (
***@acme.com), phone becomes last-4 visible. A sales rep exporting their own account list for a call sheet needs raw values, so an explicit "export unmasked" action is available but is logged with the requester, timestamp, and row count, distinct from the default masked export. - Restricted columns default to tokenized, not just masked, on export. A tokenized value (a random surrogate replacing the real value, with the mapping held in a separate, tightly access-controlled vault) preserves the ability to join or de-duplicate records by the token without ever putting the raw restricted value into an exported file. Reversing a token back to the real value requires a separate, audited request against the vault, not just re-running the export.
- Bulk exports get an extra gate. A single row export (one contact's card) and a 50,000-row bulk export carry very different risk, so exports above a configurable row threshold require a second approval regardless of role, since bulk exfiltration is the actual threat this control exists to catch.
Trade-off between tightening this and keeping sales and analytics productive
Tightening column access and masking exports protects the company from a breach or a compliance violation, but every added control point (an approval step, a masked-by-default value, a token that needs unmasking) adds latency to a sales rep who needs a phone number to make a call right now, or an analyst who needs to validate an anomaly against a real record.
The trade-off resolves cleanly along one axis: default to restrictive, make the unrestricted path fast for the common case. A sales rep's own assigned accounts should never feel gated (row-level access plus unmasked confidential fields, no extra click), because that is their actual job. What gets gated is the exceptional case: bulk export, cross-territory access, or restricted-tier fields. If the common case is fast and only the exceptional case has friction, sales and analytics stay productive while the actual risk surface (bulk exfiltration, restricted-field misuse) is where the friction concentrates. Getting this backwards, adding friction to the common case while leaving bulk export easy, is the pattern that both angers users and fails to reduce real risk.
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.