Sub topic 14
Governance, Data Quality and Retention
This chapter assumes you know the four data types, how consent and purposes work, and where a CRM, CDP and warehouse sit. It covers the rules and routines that keep a first-party and zero-party data program trustworthy after launch.
Why governance comes after collection
Collecting data is a one-time build. Keeping it accurate, lawful and useful is ongoing work. Without governance, three things usually happen:
- Duplicate and stale records inflate audience sizes and distort reports.
- Consent records drift out of sync between tools, so a customer who opted out still receives email.
- Data piles up with no reason to keep it, which raises breach risk and legal exposure.
Governance is the set of owners, rules and checks that prevent this. It is not a committee that blocks work. A good setup makes the right action the easy one.
Ownership and decision rights
Every data domain needs a named owner. "Marketing owns it" is too vague to act on. The table shows a workable split.
| Role | Responsibility | Example decision |
|---|---|---|
| Data owner | Accountable for a domain such as consent or preferences | Approves a new purpose for collecting data |
| Data steward | Maintains definitions, fixes quality issues | Merges duplicate records, updates field definitions |
| Engineer or analyst | Builds pipelines and checks | Adds a validation test to the load job |
| Privacy or legal contact | Interprets regulation | Sets retention periods for each purpose |
In a small team one person may hold several roles. Write the names down anyway. When a quality alert fires, someone must know it is theirs.
A data dictionary
A data dictionary lists each field with its meaning, type, source, allowed values, consent purpose and owner. Without one, two teams use preferred_category to mean different things. Keep the dictionary next to the schema, in version control if you can, so changes are reviewed.
Data quality
Quality is measurable. Pick dimensions, set thresholds and test them on a schedule.
| Dimension | Question | Example check |
|---|---|---|
| Completeness | Are required fields filled? | Share of profiles with a valid email |
| Validity | Do values match the allowed format or list? | Country is an ISO code |
| Uniqueness | Is each customer stored once? | Count of duplicate emails |
| Freshness | Is the data recent enough to act on? | Days since last preference update |
| Consistency | Do systems agree? | Consent status matches between CDP and email platform |
Running checks in SQL
The query below, written for PostgreSQL, reports completeness, validity and uniqueness in a single pass over a customers table. It reuses the customers table from earlier chapters.
SELECT
COUNT(*) AS total_profiles,
ROUND(100.0 * COUNT(email) / COUNT(*), 1) AS pct_with_email,
ROUND(100.0 * COUNT(preferred_category) / COUNT(*), 1) AS pct_with_preference,
COUNT(*) FILTER (
WHERE email IS NOT NULL
AND email !~ '^[^@\s]+@[^@\s]+\.[^@\s]+$'
) AS invalid_emails,
COUNT(email) - COUNT(DISTINCT LOWER(email)) AS duplicate_emails
FROM customers;Run this on a schedule and store the results. A single reading tells you little, but a drop from 82% to 61% email completeness after a site release points straight at a broken form.
Fix at the source
Cleaning data downstream is a patch. Prevent bad data where it enters:
- Validate formats in forms, and use dropdowns for fields with a fixed list.
- Normalize at ingestion, for example lowercase emails and trim whitespace.
- Reject or quarantine records that fail required checks instead of loading them silently.
- Track the source system on every record so you can find which channel produces errors.
Zero-party data decays
A stated preference is accurate on the day it is given. People change jobs, move and take up new hobbies. Store the collected_at timestamp from the earlier record example and treat old answers as weaker signals. Prompt for a refresh after a set period, such as 12 months, or when behavior contradicts the stated preference. A customer who said "trail running" and now buys only road shoes is a reason to ask again, not a reason to overwrite the answer without telling them.
Retention
Retention rules answer two questions: how long do you keep each kind of data, and what happens when time is up. Regulations such as GDPR require that you keep personal data no longer than needed for its stated purpose. Exact periods depend on your jurisdiction and your legal advice, so the figures below are illustrations, not recommendations.
A retention schedule
Tie each period to a purpose, because purpose is what justifies keeping data.
retention_schedule:
- data: marketing_email_engagement
purpose: email_marketing
keep_for_days: 730
after_expiry: aggregate_then_delete
- data: web_event_stream
purpose: analytics
keep_for_days: 395
after_expiry: delete
- data: preference_center_answers
purpose: personalization
keep_for_days: 1095
after_expiry: ask_to_refresh_then_delete
- data: consent_records
purpose: proof_of_consent
keep_for_days: 2190
after_expiry: review
- data: inactive_customer_profile
purpose: email_marketing
keep_for_days: 1095
after_expiry: delete_and_suppressConsent records are the exception. You often need to keep proof that a customer agreed, or later withdrew, for longer than the marketing data that depended on it.
Aggregate instead of delete
Aggregation turns individual rows into counts that no longer identify a person. If you keep monthly click totals by campaign, you can drop the raw events and still report on history. Check with your privacy contact that the aggregate is truly anonymous. Small groups can still identify individuals.
The suppression list
Deletion creates a trap. If you erase an opted-out customer completely, a later import or purchased list can add them back, and you will email someone who said no. Keep a minimal suppression list holding only a hash of the email and the reason.
INSERT INTO suppression (email_hash, reason, added_at)
SELECT
encode(sha256(convert_to(LOWER(email), 'UTF8')), 'hex'),
'inactive_retention_expiry',
NOW()
FROM customers
WHERE last_activity_at < NOW() - INTERVAL '1095 days'
ON CONFLICT (email_hash) DO NOTHING;
DELETE FROM customers
WHERE last_activity_at < NOW() - INTERVAL '1095 days';This assumes a suppression table with a unique constraint on email_hash. Run both statements in one transaction so a failure cannot leave profiles deleted without suppression entries. Every import must check against the suppression list before loading.
Deletion must reach every copy
A customer's data usually lives in the CRM, the CDP, the warehouse, the email platform, ad audiences and backups. A deletion request that clears one system but not the others has not been honored. Maintain a map of where each personal field is stored and which pipeline propagates deletes. Backups are typically allowed to expire on their normal cycle, but the restore process must reapply deletions.
The data lifecycle
The diagram shows the states a record passes through and what triggers each change.
Access, audit and change control
Limit who can see and export personal data. Apply least privilege: an analyst building reports may need aggregated tables, not raw emails. Log access to sensitive tables and exports.
Change control matters for consent logic. Any change to a form, a purpose label or a segment definition can alter what you are allowed to do with the data. Review such changes before release, and record who approved them.
Common errors
- No owner for quality alerts. Checks run, dashboards go red, and nobody acts. Assign each check to a named steward.
- Retention set once and forgotten. Purposes change as programs grow. Review the schedule at least yearly.
- Keeping data "just in case". Unused data has cost and risk with no purpose to justify it.
- Merging records without lineage. After a duplicate merge, you may lose which consent belonged to which record. Keep the most restrictive consent when merging, and keep a merge log.
- Deleting without suppressing. Covered above. The customer returns through the next import.
- Treating consent status as a single flag. Consent is per purpose. A quality check should confirm that every profile used in a segment has a matching purpose record.
Putting it together
A minimal governance routine looks like this. A weekly job runs the quality query and posts the numbers to the steward. A monthly job applies the retention schedule and reports how many records it purged and suppressed. A quarterly review checks the data dictionary, purposes and schedule against what the program actually does. Each routine has an owner and a threshold that triggers action. That is enough to catch most problems early, and it gives you evidence for audits.
Exercise
A customer withdraws consent for email marketing. Your team deletes their row from the CRM. Two weeks later they receive a promotional email from a list upload. Name two failures in the process and the fix for each.
Show answer
First, the deletion was not propagated to every system, so the email platform or a list copy still held the address. Fix: maintain a data map and propagate deletes and opt-outs to all downstream tools. Second, there was no suppression list, so the upload re-added the address. Fix: store a hash of the email in a suppression table and check every import against it before loading.
Exercise
Your quality report shows preference completeness fell from 78% to 54% the day after a site release, while email completeness stayed at 96%. What is the most likely cause, and which control would have caught it earlier?
Show answer
The release probably broke or hid the preference field in the preference center or sign-up form, since only that field dropped. An automated completeness check with an alert threshold, run on a schedule, would have flagged the drop within a day. Change review before release, including a test of form submissions, would likely have prevented it.