Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 152/ 160
08. Data Quality, Governance, Security & AI Infrastructure

Privacy Regulations Compliance (GDPR, DPDP Act, HIPAA, Right to be Forgotten)

Design pipelines that support GDPR/DPDP/HIPAA requirements including deletion and consent.

AdvancedGDPR · DPDP · HIPAA3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Purpose, basis, region, controller, and processor. Next, fields, retention, access, and pseudonymization. Finally, lineage, consent, processor notice, and deletion/incident logs.

Think of it like…

Privacy compliance is a provenance and permissions ledger, not a banner: it records why each copy exists, who may use it, when it must expire, and how a rights request reaches every branch.

Where you’ve seen it

A consented user record has a region-specific purpose/expiry; a subject request fans out to Postgres, Kafka compacted keys, S3/Iceberg delete/merge, feature stores, vector indexes, and processors with ticketed evidence, while an approved HIPAA audit record is retained separately.

Words you’ll hear

GDPR
The EU framework for personal data principles, rights, lawful processing, breach notification, and accountability.
DPDP
India's Digital Personal Data Protection Act and rules/implementation requiring consent/notice and data-principal controls subject to applicable scope.
HIPAA
US healthcare privacy/security framework for covered entities/business associates and protected health information.
Operational boundary
Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention. Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

Visual diagram

Loading interactive diagram

Theory & deep dive

GDPR: the working mechanism

GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping.

Purpose, basis, region, controller, and processor. Fields, retention, access, and pseudonymization, then access, correction, restriction, deletion, portability; this exposes the state governed by HIPAA.

Privacy Regulations Compliance in one concrete design

A consented user record has a region-specific purpose/expiry; a subject request fans out to Postgres, Kafka compacted keys, S3/Iceberg delete/merge, feature stores, vector indexes, and processors with ticketed evidence, while an approved HIPAA audit record is retained separately.

Key takeaway: GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping

Privacy Regulations Compliance: failure mode and production response

Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.

Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs. Track Deletion coverage as "all live, derived, cached, backup, and processor copies", and make Purpose/consent expiry visible to the dataset owner.

Key takeaway: Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

How it works, step by step

Step 1 of 4
GDPR

1. Map processing

Purpose, basis, region, controller, and processor. GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping.

purpose, basis, region, controller, and processor
Key numbers at this step
Deletion coverage
all live, derived, cached, backup, and processor copies
DPDP
India's Digital Personal Data Protection Act and rules/implementation requiring consent/notice and data-principal controls subject to applicable scope.

When to use it & trade-offs

What it is

GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping. A consented user record has a region-specific purpose/expiry; a subject request fans out to Postgres, Kafka compacted keys, S3/Iceberg delete/merge, feature stores, vector indexes, and processors with ticketed evidence, while an approved HIPAA audit record is retained separately.

Why it matters: Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention. Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

When to reach for it

  • Design pipelines that support GDPR/DPDP/HIPAA requirements including deletion and consent.
  • Choose GDPR because it provides this capability: The EU framework for personal data principles, rights, lawful processing, breach notification, and accountability.
  • Keep evidence for Deletion coverage at "all live, derived, cached, backup, and processor copies" so the last production stage-Evidence - lineage, consent, processor notice, and deletion/incident logs-remains testable.

When to avoid or be careful

  • Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.
  • Do not conflate DPDP with GDPR. The second concept contributes different behavior: India's Digital Personal Data Protection Act and rules/implementation requiring consent/notice and data-principal controls subject to applicable scope.
  • Release only after this guardrail is in place: Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

GDPR / DPDP / HIPAA - roles, limits, and operating cost

GDPR
Best for: The EU framework for personal data principles, rights, lawful processing, breach notification, and accountability.

Strengths: The EU framework for personal data principles, rights, lawful processing, breach notification, and accountability. GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping.

Watch out: Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.

DPDP
Best for: India's Digital Personal Data Protection Act and rules/implementation requiring consent/notice and data-principal controls subject to applicable scope.

Strengths: India's Digital Personal Data Protection Act and rules/implementation requiring consent/notice and data-principal controls subject to applicable scope. In this workflow it supports: Honor rights - access, correction, restriction, deletion, portability.

Watch out: The operating cost is real: timestamp and retention rule per data use.

HIPAA
Best for: US healthcare privacy/security framework for covered entities/business associates and protected health information.

Strengths: US healthcare privacy/security framework for covered entities/business associates and protected health information. Its output can be checked with Subject request SLA.

Watch out: Operating guardrail: Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for GDPR, and how would Deletion coverage reveal it?”
  • “Why is DPDP distinct from this behavior: US healthcare privacy/security framework for covered entities/business associates and protected health information?”
  • Production clue: Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.
  • Design probe: Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

Benchmarks & rules of thumb

Deletion coverage -
all live, derived, cached, backup, and processor copies
Purpose/consent expiry -
timestamp and retention rule per data use
Subject request SLA -
legal deadline plus internal owner/identity verification

Common mistakes & follow-ups

Common interview mistakes

  • Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.
  • Reporting success from a job exit code without checking Deletion coverage and Purpose/consent expiry.
  • Treating this example as complete without replay, rollback, or access boundaries: A consented user record has a region-specific purpose/expiry; a subject request fans out to Postgres, Kafka compacted keys, S3/Iceberg delete/merge, feature stores, vector indexes, and processors with ticketed evidence, while an approved HIPAA audit record is retained separately.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: The EU framework for personal data principles, rights, lawful processing, breach notification, and accountability.
  • What does the recovery plan do when this occurs? Running a global DELETE FROM warehouse does not erase lake copies, backups, logs, model artifacts, or downstream processors; collecting consent once can be mistaken for unlimited purpose or indefinite retention.
  • When is GDPR insufficient for Purpose/consent expiry, and what does adding DPDP cost in Deletion coverage?
Interview tip: Lead with the data path and failure boundary: GDPR, India's DPDP Act, and HIPAA impose different consent, purpose, minimization, security, breach, subject-rights, processor/controller, and deletion/retention duties that require design and legal mapping. Then make the answer operational: Map data purpose, controller/processor, region and lawful basis with counsel, propagate subject-right requests by identifier/lineage, preserve only documented legal holds, encrypt/limit access, and produce evidence and retention/deletion SLAs.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Privacy Regulations Compliance (GDPR, DPDP Act, HIPAA, Right to be Forgotten) with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Role-Based Access Control (RBAC) & Attribute-Based Access Control (ABAC)
Next topic
Infrastructure as Code (IaC) for Data Platforms with Terraform