---
title: "How Meta discovers data flows via lineage at scale"
description: "Meta builds a data lineage graph across its web, data warehouse and AI systems to find where sensitive data such as Facebook Dating religion fields flows, so privacy controls like Policy Zones can be applied."
url: "https://swe.quest/articles/how-meta-discovers-data-flows-via-lineage-at-scale-8ef1c9f35e0ab6a8"
canonical: "https://engineering.fb.com/2025/01/22/security/how-meta-discovers-data-flows-via-lineage-at-scale/"
source: "Meta Engineering"
published: "2025-01-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["privacy","static-analysis","data-pipelines","observability"]
---

# How Meta discovers data flows via lineage at scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2025-01-23, 13 min read, Case study. Original: [https://engineering.fb.com/2025/01/22/security/how-meta-discovers-data-flows-via-lineage-at-scale/](https://engineering.fb.com/2025/01/22/security/how-meta-discovers-data-flows-via-lineage-at-scale/)

## Summary

Meta builds a data lineage graph across its web, data warehouse and AI systems to find where sensitive data such as Facebook Dating religion fields flows, so privacy controls like Policy Zones can be applied. Signals come from static code analysis, from Privacy Probes runtime instrumentation, and from SQL analysis of Presto and Spark query logs and AI training configs. Privacy Probes captures sampled source and sink payloads within a request and classifies pairs as a high-confidence match-set (exact or contains match) or a noisier full-set that can include transformed flows. An iterative tool in Policy Zone Manager then walks the graph from sources, with developers or heuristics excluding irrelevant nodes so that whole downstream branches are pruned at once.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Static analysis](https://swe.quest/tags/static-analysis.md) (Engineering practices)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- data warehouse basics ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- static code analysis concepts
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

Privacy Aware Infrastructure, Policy Zones, Privacy Probes, Policy Zone Manager, Presto, Spark, FBLearner Flow, PyTorch

## Related posts

- [How Meta enforces purpose limitation via Privacy Aware Infrastructure at scale](https://swe.quest/articles/how-meta-enforces-purpose-limitation-via-privacy-aware-infrastructure-at-scale-4130d5b9e1cba60a.md): Meta Engineering · 2024-08-27 · Medium · 14 min read · Privacy, Security, Data pipelines
  Meta enforces purpose limitation (data used only for allowed purposes) with Policy Zones, an information flow control system built into HHVM, Presto, Spark and other infrastructure.
- [Scaling Privacy Infrastructure for GenAI Product Innovation](https://swe.quest/articles/scaling-privacy-infrastructure-for-genai-product-innovation-98d3311fada3a633.md): Meta Engineering · 2025-10-23 · Easy · 9 min read · Privacy, Data pipelines, LLMs, Observability
  Meta scales its Privacy Aware Infrastructure (PAI) to cover GenAI products such as its AI glasses, using cross-stack data lineage as the foundation for automated privacy enforcement.
- [Policy Zones: How Meta enforces purpose limitation at scale in batch processing systems](https://swe.quest/articles/policy-zones-how-meta-enforces-purpose-limitation-at-scale-in-batch-processing-615adcc0c88f4c90.md): Meta Engineering · 2025-07-23 · Medium · 20 min read · Privacy, Data pipelines, Identity & auth, SQL
  Meta's Policy Zones, part of its Privacy Aware Infrastructure, applies information flow control to enforce purpose limitation across an exabyte-scale data warehouse.
- [PrivacyLib: Privacy Controls at the Data Access Boundary](https://swe.quest/articles/privacylib-privacy-controls-at-the-data-access-boundary-f868c0b03bdc9ad2.md): Meta Engineering · 2026-10-27 · Medium · 17 min read · Privacy, System design, Identity & auth, AI agents, Performance engineering
  PrivacyLib is a common library embedded in the clients of hundreds of Meta data and processing systems that enforces and observes privacy requirements at the point of data access.
- [How Meta understands data at scale](https://swe.quest/articles/how-meta-understands-data-at-scale-ab2f3889e09c8113.md): Meta Engineering · 2025-04-28 · Medium · 19 min read · Privacy, Data pipelines, Machine learning, System design
  Meta's Privacy Aware Infrastructure builds data understanding by schematizing every data asset in a canonical Thrift-based format (DataSchema, covering over 100 million schemas across 100+ systems) and annotating fields with a universal privacy taxonomy of semantic types.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
