Every job was green
On Monday morning TiffinGo’s revenue dashboard shows ₹38.6 crore for Sunday, a hundred times the usual figure. The CEO forwards it to the whole leadership group with one line: “Is this real?” By noon Kabir finds the cause: the payments team started sending amounts in paise instead of rupees, and nothing in the pipeline checked. On Wednesday a vendor reports that a spreadsheet with two lakh customer phone numbers is open to anyone with the link.
Sir, the pipeline didn’t fail. Every job was green. That’s what scares me.
That’s the lesson, Kabir. A pipeline can run perfectly and still deliver wrong data. Data quality checks catch that. And knowing who owns each table, where it came from and who may see it is governance.
And the phone numbers? That sounds like a security problem, not a data one.
It’s both, Riya. Personal data needs protection by design: masking, access control, encryption, audit logs. In India the Digital Personal Data Protection Act, 2023 also makes it a legal duty, with penalties of up to ₹250 crore.
So quality, governance, security and privacy are four separate jobs?
Four sides of one promise: the right data, correct, to the right people, used lawfully. Today you’ll build a quality gate, trace a broken number to its source, mask personal data, and handle a deletion request and a breach the DPDP way.
Data quality, governance, security and privacy
Data quality is the degree to which data is fit for its intended use, measured along dimensions such as accuracy, completeness, consistency, timeliness, validity and uniqueness. Data governance is the set of roles, policies, standards and processes that ensure data is managed as an asset: ownership and stewardship, metadata and catalogs, lineage, classification, retention and access policies. Data security protects data against unauthorised access, modification and loss through identity and access management, encryption, network controls, monitoring and auditing. Data privacy governs the lawful processing of personal data, in India under the Digital Personal Data Protection Act, 2023 and the DPDP Rules, 2025.
Quality: is the data correct? Governance: who owns it, what does it mean, who may use it? Security: is it locked so only the right people can reach it? Privacy: are we using people’s personal data fairly, with their permission, and as the law requires?
Words you’ll meet in this lesson
DPDP Act and Rules: the key facts (as of October 2026)
| Law and rules | Digital Personal Data Protection Act, 2023; DPDP Rules, 2025 notified in November 2025, with phased implementation |
|---|---|
| Timeline | Data Protection Board set up first; consent-manager provisions from about November 2026; most obligations from about May 2027 (the government has consulted on shortening this for large companies) |
| Breach | Inform the Data Protection Board and affected people without delay; a detailed report to the Board within 72 hours |
| Penalties | Up to ₹250 crore for failing to take reasonable security safeguards; up to ₹200 crore for not notifying a breach or for children’s-data violations |
This is a learning summary, not legal advice. Check the current Act, Rules and notifications on meity.gov.in before making compliance decisions.
Quality, governance and security at three levels
Beginner Trustworthy data, simply
- Data quality means the data is correct and usable: no missing values where needed, no duplicates, sensible ranges, delivered on time.
- Governance means clear rules: who owns each dataset, what each column means, who may use it, how long it is kept.
- Security means only allowed people and programs can read or change data, and every access is logged.
- Privacy means personal data (name, phone, email, location, payments) is collected with consent, used only for the stated purpose and deleted when no longer needed.
Intermediate How teams put it into practice
- Quality dimensions: accuracy, completeness, consistency, timeliness (freshness), validity (format and range) and uniqueness.
- Quality checks in pipelines: tests on every load (row counts, nulls, ranges, uniqueness, referential integrity), with bad rows quarantined and the pipeline stopped above a threshold. Tools: Great Expectations, dbt tests, Soda, Deequ, Delta Live Tables expectations.
- Governance tools: a data catalog (what exists, owner, meaning), lineage (where data came from and where it goes), classification (tagging PII and sensitive columns) and data contracts between producers and consumers.
- Security controls: role-based access (RBAC), column masking and row-level filters, encryption at rest and in transit, secrets in a vault, private networks, audit logs.
Advanced Privacy law, observability and hard problems
- DPDP Act, 2023 (India): data principals (people) and data fiduciaries (companies); consent that is free, specific and informed, with notice; purpose limitation; rights to access, correction and erasure; reasonable security safeguards; breach notification to the Data Protection Board and affected people; extra duties for children’s data and for Significant Data Fiduciaries.
- Erasure at big data scale: deleting one person from a lake means deleting from tables, derived tables, caches, ML features and eventually backups. Table formats (Delta, Iceberg, Hudi) support row-level deletes; pseudonymous keys and separate PII stores make it manageable.
- Pseudonymisation vs anonymisation: replacing an email with a salted hash is pseudonymisation (still personal data if it can be linked back); true anonymisation is hard because combinations of columns can re-identify people.
- Data observability: monitoring freshness, volume, schema and distribution changes automatically, with alerts, rather than relying only on hand-written tests.
- Data mesh and contracts: domain teams own their data products, publish schemas and SLAs as contracts, and breaking changes are caught before deployment.
Exam tip: List the six data quality dimensions with an example each, define data governance and its components (ownership, catalog, lineage, classification, policies), and name the main rights of a data principal and duties of a data fiduciary under the DPDP Act, 2023.
Six quality dimensions and four pillars
| Dimension | Question it answers | Example check at TiffinGo |
|---|---|---|
| Accuracy | Does the value match reality? | Order amounts agree with payment-gateway settlement totals |
| Completeness | Is anything missing? | City is never empty; yesterday has orders from every city |
| Consistency | Do systems agree with each other? | Order count in the lake equals the count in the orders database |
| Timeliness | Is it fresh enough? | Yesterday’s gold table is ready by 6:00 am |
| Validity | Is it in the right format and range? | Phone is 10 digits starting 6–9; amount between ₹1 and ₹50,000 |
| Uniqueness | Are there duplicates? | Each order_id appears exactly once |
Four pillars of trustworthy data
Quality
Tests and monitors on every pipeline: row counts, nulls, ranges, uniqueness, freshness, reconciliation with source systems.
CorrectGovernance
Owners and stewards, a catalog with business definitions, lineage, classification tags, retention rules and data contracts.
UnderstoodSecurity
Least-privilege access, masking and row filters, encryption, secrets management, private networks, audit logs.
ProtectedPrivacy
Consent and notice, purpose limitation, minimisation, rights requests (access, correction, erasure), breach handling under DPDP.
LawfulA cheap rule that saves careers: never publish a table you haven’t tested, and never copy personal data to a place that is less protected than its source (a laptop, a shared sheet, a test environment).
Making a dataset trustworthy
Classify the data
Kabir tags every column in the catalog:
You can’t protect what you haven’t labelled. Tags drive masking, access policies and retention automatically.phone,email,addressas PII;amountas financial;cityas internal.Write quality rules with the owner
Rules come from business meaning, so the data owner signs off: “amount between ₹1 and ₹50,000”, “one row per order”, “ready by 6 am”.rows = [120, 450, -150, 300, 0, 99000] bad = [r for r in rows if not 1 <= r <= 50_000] print("bad:", bad, f"-> {len(bad) / len(rows):.0%} failed")bad: [-150, 0, 99000] -> 50% failedGate the pipeline
Checks run after every load. Bad rows go to a quarantine table; if more than 2% fail, the pipeline stops and alerts the owner instead of publishing.
A stopped pipeline with an alert is far better than a confident wrong dashboard.Mask and restrict
Analysts get masked phones and pseudonymous customer keys; only the support tool can see full numbers, and every lookup is logged.phone = "9876543210" print("masked:", "XXXXXX" + phone[-4:])masked: XXXXXX3210Record lineage and ownership
Each table in the catalog shows its owner, description, upstream sources and downstream dashboards, captured automatically from pipeline code where possible.
When a number looks wrong, lineage turns hours of guessing into minutes of tracing.Plan for rights and breaches
A runbook says how to find and delete one customer everywhere, how long each table is kept, and who notifies the Data Protection Board and customers if a breach happens.
DPDP turns these from good ideas into legal duties with deadlines.
A wrong number: what Kabir sees, and where it came from
Step through the six frames. Left: the dashboard Kabir is debugging. Right: the lineage graph that leads him to the cause.
- The dashboard shows ₹38.6 crore for Sunday, about 100 times normal.
- Kabir opens the gold table in the catalog and clicks Lineage.
- He follows it upstream to the payments team’s orders table.
- The cause: a schema change on Saturday sent amounts in paise.
- After the fix and backfill, Sunday shows ₹38.6 lakh.
- A new quality check and a data contract protect the table from now on.
- Every job succeeded, so no alert fired. Pipeline monitoring checks that jobs ran, not that values make sense.
- The catalog’s lineage graph shows gold.revenue is built from silver.orders, which is built from bronze.orders. The sums agree between silver and gold, so the transformation is not the problem.
- Comparing distributions shows the median order amount jumped from about 320 to 32,000 on Saturday, already in the raw bronze copy.
- The payments team switched the amount field to paise (a common way to avoid decimals) without telling consumers. There was no data contract or schema review.
- Kabir converts new rows in silver and reprocesses the affected date partitions, so history is correct again.
- Two protections are added: a data contract with the payments team specifying the unit, and a distribution check that stops publishing if the median amount leaves its normal range.
Real-time scenarios: quality gate, access and privacy law
Three live scenarios: a quality gate on a real batch (numbers from the program below), one table seen through different roles, and an advanced look at erasure requests and breaches under the DPDP Act.
Real-time scenario 1A quality gate catches 110 bad rows
These figures come from the program in “Run it on your PC” below. Watch a nightly batch pass through four checks before it is allowed into trusted tables.
- A nightly batch of 10,030 order rows lands in the lake. Before it reaches analysts, four rules run.
- The amount check finds 40 negative values and the uniqueness check finds 30 orders sent twice, a common side effect of retries.
- The completeness check finds 25 rows with no city and the validity check finds 15 phones that are not 10-digit Indian mobile numbers. Failing rows are written to a quarantine table, not deleted.
- In total 9,920 rows pass and 110 are quarantined, a failure rate of 1.10%.
- Because the rate is below the agreed 2% threshold, the good rows are published and the data owner is alerted to fix the source. Above 2%, the pipeline would stop entirely.
One table, different views for different roles
Instead of making copies with columns removed, modern platforms apply masking and row filters when the query runs, based on who is asking. Watch the same query return different results.
- A support agent sees full phone numbers, because calling customers is their job. Each lookup is recorded in an audit log.
- An analyst running the same query sees names hidden and phones masked. Column masking policies apply automatically based on the user’s role and the column’s PII tag.
- A row-level filter limits the Pune team to Pune customers: least privilege for rows as well as columns.
- Policies block exporting PII columns to unmanaged places such as laptops or public sheets, the exact cause of Wednesday’s leak.
- Audit logs record who read which sensitive data and when. The second row stands out: one analyst account read 3,910 customer rows at 2:14 am, which the security team investigates.
An erasure request and a breach under the DPDP Act
Privacy law turns data engineering choices into deadlines. Watch how a well-governed lake handles a customer’s erasure request, and what must happen when a breach is found.
- A customer withdraws consent and asks for her data to be erased. Because the platform uses a pseudonymous customer key and a catalog with PII tags, the team can list every place her data lives.
- Lake tables in Delta Lake or Iceberg support row-level deletes by key. Old file versions that still contain the row are removed by vacuum or snapshot expiry after the retention window.
- Derived ML features and exported copies are deleted too. Backups usually can’t be edited, so they expire on a fixed schedule and are never restored for erased customers. The request and its completion are logged.
- Separately, a CRM export bucket is found to be publicly readable with two lakh phone numbers. That is a personal data breach.
- The team closes access, investigates scope and cause, and under the DPDP Rules informs the Data Protection Board and affected people without delay, with a detailed report to the Board within 72 hours. Penalties for failing to protect or notify can reach ₹200–250 crore. (Learning summary, not legal advice.)
Where you’ll see this at work
1. Quality checks in every pipeline
Data teams add tests (dbt tests, Great Expectations, Soda, Deequ) to each model and stop publishing on failure. Data observability tools watch freshness, volume and schema automatically.
2. Catalogs and lineage
Unity Catalog, AWS Glue Data Catalog with Lake Formation, Microsoft Purview, Google Dataplex, DataHub and OpenMetadata record owners, descriptions, PII tags and lineage.
3. Banks, fintech and health
Regulated sectors combine RBI, SEBI or sector rules with DPDP: tokenised card data, data localisation, strict access reviews and long audit trails.
4. Consumer apps preparing for DPDP
Indian apps are building consent records, purpose tags, deletion workflows across lakes and backups, and breach-response runbooks before the main obligations apply.
Sources
- DPDP Rules timelines, breach reporting and penalties: Uniqus, November 2025; Government of India explainer on the DPDP Rules, PIB, November 2025.
- Proposal to shorten compliance timelines: S.S. Rana & Co., 2026.
Write your first data quality checks
A few order rows are checked against rules for validity, completeness and uniqueness. Rows that fail are quarantined with the reason. Then try the challenges: freshness, reconciliation, masking, pseudonymous keys and a publish threshold.
orders = [
{"id": "O1", "city": "Pune", "amount": 320},
{"id": "O2", "city": "", "amount": 150},
{"id": "O3", "city": "Thane", "amount": -40},
{"id": "O1", "city": "Pune", "amount": 320},
{"id": "O4", "city": "Mumbai", "amount": 610},
]
seen, good, quarantine = set(), [], []
for o in orders:
reasons = []
if not o["city"]:
reasons.append("missing city")
if o["amount"] <= 0:
reasons.append("amount not positive")
if o["id"] in seen:
reasons.append("duplicate id")
seen.add(o["id"])
(quarantine if reasons else good).append((o["id"], reasons))
print("good :", [i for i, _ in good])
print("quarantine:", quarantine)if not o["city"]:Completeness: a required field is empty.if o["id"] in seen:Uniqueness: the same order arrived twice.
Run it on your PC: a quality gate with privacy masking
This program creates a batch of 10,030 orders with realistic problems (negative amounts, missing cities, invalid phones, duplicates), runs four quality checks, quarantines failing rows, decides whether to publish, and writes a clean CSV where emails become pseudonymous keys and phones are masked. Save it as quality_guard.py.
Check, quarantine, mask, publish
"""A small data-quality gate and privacy step for a batch of orders.
1) generate a realistic messy batch, 2) run quality checks,
3) quarantine bad rows, 4) mask personal data before it reaches analysts."""
import csv, hashlib, random, re
from collections import Counter
random.seed(11)
CITIES = ["Pune", "Mumbai", "Thane", "Nashik"]
rows = []
for i in range(1, 10_001):
rows.append({"order_id": f"O{i:05d}", "phone": f"9{random.randint(100000000, 999999999)}",
"email": f"user{i}@example.com", "city": random.choice(CITIES),
"amount": str(random.randint(80, 900)), "order_date": "2026-10-19"})
# inject the kinds of problems real batches have
for i in random.sample(range(10_000), 40):
rows[i]["amount"] = "-150" # negative amount
for i in random.sample(range(10_000), 25):
rows[i]["city"] = "" # missing city
for i in random.sample(range(10_000), 15):
rows[i]["phone"] = "12345" # invalid phone
rows += [dict(rows[i]) for i in random.sample(range(10_000), 30)] # duplicates
CHECKS = {
"amount is positive": lambda r: r["amount"].lstrip("-").isdigit() and int(r["amount"]) > 0,
"city present": lambda r: r["city"] in CITIES,
"phone is 10 digits": lambda r: re.fullmatch(r"[6-9]\d{9}", r["phone"]) is not None,
}
seen, good, bad, failures = set(), [], [], Counter()
for r in rows:
problems = [name for name, ok in CHECKS.items() if not ok(r)]
if r["order_id"] in seen:
problems.append("order_id unique")
seen.add(r["order_id"])
for p in problems:
failures[p] += 1
(bad if problems else good).append(r)
print(f"batch rows : {len(rows):,}")
for name, n in failures.most_common():
print(f" FAIL {name:20}: {n}")
print(f"passed : {len(good):,} quarantined: {len(bad)}")
fail_rate = len(bad) / len(rows) * 100
print(f"failure rate : {fail_rate:.2f}% ->", "PUBLISH" if fail_rate < 2 else "STOP the pipeline")
SALT = "keep-this-secret" # in real life: from a secrets manager, never in code
def pseudonym(value):
return hashlib.sha256((SALT + value).encode()).hexdigest()[:12]
def mask_phone(p):
return "XXXXXX" + p[-4:]
with open("orders_clean.csv", "w", newline="") as f:
w = csv.DictWriter(f, fieldnames=["order_id", "customer_key", "phone_masked", "city", "amount", "order_date"])
w.writeheader()
for r in good:
w.writerow({"order_id": r["order_id"], "customer_key": pseudonym(r["email"]), "phone_masked": mask_phone(r["phone"]),
"city": r["city"], "amount": r["amount"], "order_date": r["order_date"]})
print("\nwrote orders_clean.csv (no raw email or phone). First row:")
print(open("orders_clean.csv").read().splitlines()[1])
# In a terminal: python quality_guard.pyRecorded from a real run with Python 3.13 (only the standard library). The data is generated with a fixed random seed, so you will get the same counts. In production the salt would come from a secrets manager, and tools such as Great Expectations, dbt tests or Soda would run the checks.
A quality check, one row at a time
Four amounts are checked against a valid range. Watch the pass and fail lists fill up.
Worked examples: real problems, solved and traced in memory
Four data-quality and privacy tasks from a real platform. Each runs live and is traced.
Percentage of missing values per column
Problem statement
Count how many values are missing in each column of a small customer table, as a percentage.
4 rows with name, city, phone
name : 25% missing city : 50% missing phone: 25% missing
Approach
- For each column, count values that are empty or None.
- Divide by the number of rows.
- Print as a percentage.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Catch the rupees-to-paise bug
Problem statement
Compare today’s median order amount with the last 7 days. Flag it if it is more than 3 times higher or lower than the 7-day median.
7 daily medians and today’s median
baseline 322, today 32150, ratio 100x -> ALERT
Approach
- Compute the median of the last 7 daily medians.
- Ratio = today ÷ baseline.
- Flag if ratio > 3 or < 1/3.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Find every column tagged as PII
Problem statement
A small catalog maps tables to columns and tags. List every PII column, grouped by table, so the privacy team knows where personal data lives.
catalog dictionary
customers: ['name', 'phone'] support_tickets: ['email', 'message']
Approach
- Loop over tables and their columns.
- Keep columns whose tags include “pii”.
- Print table: columns.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Erase one customer across tables
Problem statement
A customer’s pseudonymous key must be removed from three tables. Delete matching rows, count deletions per table and record an audit entry.
tables keyed by customer_key, key "97c8"
deleted: {'orders': 2, 'features': 1, 'crm_export': 0} | remaining orders: [('a1b2', 150)]Approach
- For each table, keep rows whose key is different.
- Count how many were removed.
- Append an audit record with the counts.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Check yourself
Quick revision
Lesson 5.1 in one screen
- Six quality dimensions: accuracy, completeness, consistency, timeliness, validity, uniqueness.
- Gate pipelines: test every load, quarantine bad rows, stop above a threshold, alert the owner.
- Green jobs ≠ correct data: add range, distribution and reconciliation checks.
- Governance = owners/stewards, catalog, lineage, classification (PII tags), contracts, retention.
- Security = least privilege (RBAC), masking, row filters, encryption, secrets vault, audit logs.
- Pseudonymisation (salted hash) ≠ anonymisation; deletion in lakes via Delta/Iceberg/Hudi deletes + vacuum.
- DPDP 2023 + Rules 2025: consent, purpose limits, erasure, safeguards, breach report within 72 h, penalties up to ₹250 crore.
Interview and viva questions
What are the dimensions of data quality?
The commonly used dimensions are accuracy (values match reality), completeness (no missing required data), consistency (systems and tables agree), timeliness (data is fresh when needed), validity (values follow formats, types and ranges) and uniqueness (no unintended duplicates). Some frameworks add integrity, relevance and accessibility.
What is the difference between data governance and data management?
Data governance sets the rules, roles and accountability: who owns data, what policies apply, how quality and access are decided. Data management is the day-to-day execution: building pipelines, storing, securing, cleaning and delivering data according to those rules.
How do you implement data quality checks in a pipeline?
Define rules with data owners, then run automated tests after each load: schema, row counts, nulls, ranges, uniqueness, referential integrity, freshness and reconciliation with source totals. Quarantine failing rows, stop publishing above a threshold, alert the owner and track quality metrics over time. Tools include dbt tests, Great Expectations, Soda, Deequ and Delta Live Tables expectations.
What is the DPDP Act and how does it affect data engineers?
The Digital Personal Data Protection Act, 2023 is India's law on processing digital personal data, made operational by the DPDP Rules, 2025 with phased timelines. It requires notice and consent, purpose limitation, data minimisation, reasonable security safeguards, honouring rights such as erasure, breach notification and extra care for children's data. For data engineers this means tagging PII, limiting copies, masking, access controls, retention and deletion workflows across lakes and backups, audit logs and breach-response plans.
How do you delete personal data from a data lake?
Locate all copies using a catalog and a consistent customer key, run row-level deletes on tables stored in formats such as Delta Lake, Apache Iceberg or Hudi, remove old file versions with vacuum or snapshot expiry, delete derived tables, features and exports, and let immutable backups expire on a defined schedule without restoring erased records. Record the request and completion for audit.
Practice problems
Data-quality, masking and privacy exercises. The last two are business tasks.
Count nulls
Count the None values in [12, None, 7, None, 3].
list
2
Show solution and explanation
print([12, None, 7, None, 3].count(None))How it works: Completeness checks start with counting missing values.
Find duplicates
Print the IDs that appear more than once in ["a", "b", "a", "c", "b", "a"].
list of IDs
['a', 'b']
Show solution and explanation
from collections import Counter
print([k for k, v in Counter(["a", "b", "a", "c", "b", "a"]).items() if v > 1])How it works: Uniqueness check: count occurrences per key.
Mask a phone
Print 9876543210 with only the last 4 digits visible.
9876543210
XXXXXX3210
Show solution and explanation
p = "9876543210"
print("X" * 6 + p[-4:])How it works: Masking keeps enough to recognise a number without exposing it.
Validate phones
Print which of ["9876543210", "12345", "6123456789", "5123456789"] are valid Indian mobile numbers (10 digits, starting 6–9).
4 strings
['9876543210', '6123456789']
Show solution and explanation
import re
print([p for p in ["9876543210", "12345", "6123456789", "5123456789"] if re.fullmatch(r"[6-9]\d{9}", p)])How it works: A regular expression expresses the validity rule precisely.
Reconcile totals
Source total Rs 15,43,289; lake total Rs 15,43,164. Print the difference and whether it is within Rs 100.
two totals
-125 MISMATCH
Show solution and explanation
d = 15_43_164 - 15_43_289
print(d, "OK" if abs(d) <= 100 else "MISMATCH")How it works: Consistency checks compare systems; tolerances must be agreed with the owner.
Pseudonymous key
Print the first 10 hex characters of SHA-256 of "salt" + "asha@example.com".
d17065027e
Show solution and explanation
import hashlib
print(hashlib.sha256(("salt" + "asha@example.com").encode()).hexdigest()[:10])How it works: The same input always gives the same key, so joins still work.
Retention check
Partitions older than 365 days must be deleted. Given ages [12, 400, 365, 800, 90], print those to delete.
ages in days
[400, 800]
Show solution and explanation
print([a for a in [12, 400, 365, 800, 90] if a > 365])How it works: Retention rules limit how long personal data is kept.
Cost of bad data
Each wrongly refunded order costs Rs 240. Duplicates caused 1,850 wrong refunds last month. Print the loss and the yearly loss.
1,850 × Rs 240
Rs 444,000 per month, Rs 5,328,000 per year
Show solution and explanation
m = 1_850 * 240
print(f"Rs {m:,} per month, Rs {m * 12:,} per year")How it works: Putting a rupee value on quality issues helps prioritise fixes.
Quality score
A table passed 46 of 50 checks this week. Print the quality score and whether it meets the 95% target.
46/50
92% below target
Show solution and explanation
s = 46 / 50
print(f"{s:.0%}", "meets target" if s >= 0.95 else "below target")How it works: A simple score per table makes quality visible to owners.
Real-world scenario questions (asked in company interviews)
Quality, security and privacy questions from real projects and interviews. Decide your answer first, then open the model answer.
The dashboard shows 100× revenue
A revenue dashboard suddenly shows a figure about 100 times higher than usual. All pipeline jobs succeeded.
The interviewer is checking: can you debug a data issue systematically?
Show a strong answer
- Confirm the symptom and its start date; tell stakeholders you are investigating.
- Follow lineage upstream, comparing counts and sums at each layer to find where values change.
- Check for schema or unit changes (rupees to paise), duplicates, or join explosions.
- Fix the transformation and backfill affected partitions.
- Prevent recurrence: range/distribution checks, a data contract with the source team, and alerts.
Avoid: patching the dashboard number by hand.
Analysts need customer data, safely
Analysts want access to the customers table, which includes names, phones and addresses.
The interviewer is checking: do you apply least privilege without blocking useful work?
Show a strong answer
- Classify columns and tag PII in the catalog.
- Give analysts a view or policy with names removed, phones masked and a pseudonymous customer key for joins.
- Use row-level filters where teams should see only their region.
- Keep full access for the few roles that need it, with audit logs and periodic access reviews.
- Block exports of PII to unmanaged locations.
Avoid: giving everyone full access “just for now”, or refusing access entirely.
Delete one customer from the lake
A customer withdraws consent and asks for erasure. Their data is in raw files, Delta tables, ML features and nightly backups.
The interviewer is checking: do you understand erasure at big data scale?
Show a strong answer
Use the catalog and a pseudonymous key to find all locations. Run row-level deletes on table-format tables (Delta, Iceberg, Hudi), rewrite or expire raw files, vacuum old versions after the retention window, delete derived features and exports, and let immutable backups expire on schedule without restoring erased customers. Record the request and completion. Design ahead: keep PII in few places, separate it from event data, and use keys that make deletion cheap.
Avoid: saying “data lakes are append-only, so we can’t delete”.
“What is data governance?”
A common interview and exam question.
The interviewer is checking: can you define it with concrete components and tools?
Show a strong answer
Data governance is the framework of roles, policies and processes that keeps data accurate, understood, secure and used lawfully. Components: ownership and stewardship, a data catalog with business definitions, lineage, classification of sensitive data, quality rules and monitoring, access policies, retention and deletion rules, and compliance with laws such as India’s DPDP Act. Tools include Unity Catalog, Purview, Dataplex, Glue Data Catalog with Lake Formation, DataHub and OpenMetadata.
Avoid: describing governance only as “security”.