What Databricks does here
Databricks is the data and AI platform for development and monitoring. It keeps anonymous counts and face-free event data in governed tables, trains and validates the matcher and the spoof detector on consented, balanced data with subgroup checks, registers approved versions for a gated release to edge appliances, and provides tracing and evaluation. Member references are masked by role, and templates and images never enter the lakehouse.
Governance in Unity Catalog
One catalog per environment, with schemas by purpose. Access is granted to groups, never to individuals, and sensitive data is protected in the table, so every notebook, dashboard and evaluation job inherits the control.
| Schema | Contents | Who can read |
|---|---|---|
| bronze | Anonymous counts, gate events and traces as received | Data engineers |
| silver | Cleaned counts, consents, match proposals, deletions and model outputs, with member references masked | Engineers and analysts, with masks |
| gold | Evaluation sets, fairness reports, KPIs (Key Performance Indicators) and device health views | Privacy, quality and evaluation teams |
| knowledge | Privacy policy and notice index and its source table | The documentation service principal |
| security | Scan results and security events from the gateway | Security operations |
Protecting member references in the table
Row filters and column masks make the rule part of the table. Analysts see a masked reference; a privacy steward sees it for an approved review.
-- Member ids and consent detail are masked except for approved roles
CREATE FUNCTION retail_prod.silver.mask_member(value STRING)
RETURN CASE WHEN is_account_group_member('privacy_stewards') THEN value ELSE '***' END;
ALTER TABLE retail_prod.silver.match_proposals
ALTER COLUMN member_ref SET MASK retail_prod.silver.mask_member;
ALTER TABLE retail_prod.silver.consents
ALTER COLUMN member_ref SET MASK retail_prod.silver.mask_member;
-- Store teams see only their own store
CREATE FUNCTION retail_prod.silver.store_filter(store STRING)
RETURN is_account_group_member('retail_global') OR is_account_group_member(CONCAT('store_', store));
ALTER TABLE retail_prod.silver.count_records
SET ROW FILTER retail_prod.silver.store_filter ON (store_id);The policy index
Privacy policies, notices, retention rules and regulator guidance are chunked by clause, tagged with jurisdiction, version and effective dates, and stored in a gold table. A Vector Search index (the product is now branded Databricks AI Search) syncs from that table, so a policy change updates the index without a rebuild. The copilot filters by jurisdiction and effective date at query time, so it cannot cite a superseded notice or another country's rule.
from databricks.vector_search.client import VectorSearchClient
index = VectorSearchClient().get_index(
endpoint_name="retail-knowledge",
index_name="retail_prod.knowledge.policies_index",
)
def search_policies(question: str, jurisdiction: str, on_date: str) -> list[dict]:
hits = index.similarity_search(
query_text=question,
columns=["clause_id", "title", "text", "version", "source_url"],
filters={"jurisdiction": [jurisdiction, "all"], "effective_from <=": on_date, "effective_to >=": on_date},
num_results=5,
)
return hits["result"]["data_array"]No rebuild is needed. Effective dates make sure a notice applies only when it should.
Training, validation and release of models
Training with MLflow
Experiments, datasets and code are tracked, so every model version is traceable to its consented data.
Subgroup validation
False match, false non-match and spoof-detection rates are reported with confidence intervals by permitted group, including skin tone, age and sex, before a version can be promoted.
Gated promotion
A model moves through the registry only with passing privacy, accuracy, fairness and fault-injection results and sign-off under change control.
Edge deployment
Approved versions are packaged and staged to edge appliances through a controlled, reversible release, never directly from the cloud.
Jobs that keep it current
| Job | Schedule | What it does |
|---|---|---|
| Ingest anonymous counts | Continuous | Lands counts in bronze and upserts silver, enforcing suppression |
| Ingest gate and match events | Continuous | Lands events without faces or templates |
| Refresh policy index | On change, daily check | Re-chunks changed policies, writes the source table and syncs the index |
| Reconcile templates and consents | Nightly | Compares the register with active consents and raises orphans |
| Retrain and validate models | On demand, gated | Trains candidates on consented data, evaluates by group and registers them; promotion needs the gate |
| Nightly evaluation | Nightly and on every release | Runs the evaluation set, writes scores and alerts on regressions |
| Fairness report | Quarterly | Reports error rates by permitted group for the quality review |
What the data answers
- Orphan templates, deletion times and whether every withdrawal completed within the limit.
- Gate refusals, discards and any frame that should not exist.
- Match proposals, confirmation rates and wrong-match reports, by store.
- Error rates by permitted group, with confidence intervals.
- Software cost per enrolled member, from gateway and compute metadata.
Build this for your business
This example is speculative and not a recommendation to deploy, but the same pattern, consent first, a deterministic privacy gate, a governed gateway, runtime security, advisory-only AI and measured fairness, fits any service that handles sensitive personal data. We can scope a pilot on your own systems.
Book a discovery call