Access, governance and personal data
🎯You'll be able to
Classify data by sensitivity, give each group of people the access they need, keep personal data out of places it doesn't need to be, and know the main duties under India's data protection law.
🏠The everyday picture
In a hospital, the receptionist sees appointment times, the doctor sees the medical record, and the accountant sees the bill. Nobody sees everything just because it's all in one building.
📘What it really is
-
Classify each column: public, internal, confidential, personal (name, phone, email, address), and sensitive personal (health, finance). SabziSathi's
full_name,phoneandemailare personal. -
Least privilege: roles per job. Analysts read
marts; the pipeline writesclean; only a few people can read the customer export. Cloud warehouses support roles, column-level security, row-level security and masking policies. -
Minimise: the best protection for personal data is not copying it. SabziSathi's staging model keeps only the customer id, area and signup date; the marts have no names, phone numbers or emails.
-
Pseudonymise keys that link records about one person (DT6 Lesson 5), and aggregate before sharing.
- Retention: keep personal data only as long as needed, and be able to delete a person's data when asked.
-
The law in India: the Digital Personal Data Protection Act, 2023 applies to digital personal data. Its Rules were notified on 13 November 2025 and start in phases: the Data Protection Board's rules at once, consent managers from 13 November 2026, and most duties from 13 May 2027. Once in force, it requires a lawful purpose and notice, collecting only what's needed, reasonable security safeguards, breach reporting, and honouring people's rights to access, correct and erase their data. Other countries have their own laws (such as the GDPR in Europe, which reaches organisations outside the EU only in specific cases). Ask your organisation's privacy or legal team how they apply; this lesson is not legal advice.
-
Audit: warehouses log who queried what. Review access every few months.
📝A worked example
Input: in the solution, list every column in the marts schema with
select table_name, column_name from information_schema.columns where table_schema = 'marts'.
Expected output: no full_name, phone or email. Customers appear only as a 64-character customer_key, with signup_month (not the
exact date) and the area. The starter's dim_customers has all three personal columns and an unsalted MD5 of the phone number as its
"anonymous" key.
🌍Where it's used
- Banks and insurers: masked account numbers for analysts, full numbers for a few operations staff.
- Healthcare: research datasets with identifiers removed and small groups suppressed.
- Consumer apps: deletion requests that must reach every copy, the warehouse included.
📝Case scenario
A food-delivery company gave every analyst read access to a table of customer addresses and phone numbers "for convenience". A shared query result with 2,000 phone numbers was pasted into a public channel. Removing personal columns from marts, and limiting the customer table to the support team, would have made the shared result harmless.
🖱️Try it
Classify every column in SabziSathi's raw/customers.csv (public, internal, personal). Then write which roles should read the customer
export, the clean layer and the marts. Success: no analyst role needs the customer export.
⚠️Common mistakes
- Access for everyone "for now". Sign: interns can read phone numbers. Fix: roles per job, from the start.
- Copying personal data into marts. Sign: names in a sales table. Fix: cut it in staging; use pseudonymous keys.
- Keeping everything for ever. Sign: ten-year-old addresses nobody uses. Fix: a retention period and deletion process.
🛠️For your project
Project 2 test 3 checks no mart column or value holds personal data, and Project 3 test 6 checks the dashboard.
✅Quick check
What's the strongest protection for personal data in a warehouse?
Show the answer
Not copying it where it isn't needed.
Name two duties under India's DPDP Act.
Show the answer
For example: collect only what's needed for a stated purpose, keep it secure, report breaches, and let people correct or erase it.
