🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Metadata Management: Catalogs, Lineage, Discovery

Data EngineeringData Governance⭐ Premium

Metadata Management: Catalogs, Lineage, Discovery

Difficulty: Senior Level | Companies: LinkedIn, Netflix, Uber, Airbnb, Spotify

Every data organization eventually builds a catalog, and most of them end up as a graveyard of stale descriptions written once during a migration. The reason is rarely the tooling. It is that metadata was treated as documentation to be authored rather than as a by-product to be captured, which means it required human effort on a schedule that no team sustains. Metadata management works when the system collects most of it automatically and humans only add the parts machines cannot know: intent, ownership and caveats.

Prerequisites

  • !Relational schemas and primary keys
  • !How ETL frameworks emit lineage events
  • !Basic regex for value pattern matching

What You'll Learn

  • 1Distinguish technical, operational and business metadata
  • 2Design a catalog entry that answers a real search
  • 3Classify sensitive columns without manual tagging
  • 4Use lineage to answer impact analysis before a change

Three kinds of metadata, three different owners

Technical metadata describes structure: table and column names, data types, nullability, keys, partitioning and file formats. It is produced by the engine and needs no human. Operational metadata describes activity: run times, row counts, query history, freshness, owner of the last deployment. It is produced by the orchestrator and the warehouse. Business metadata describes meaning: what a metric counts, which fiscal calendar applies, which columns are personal data, and who to ask when a number looks wrong.

Confusing the three is why catalogs disappoint. Technical metadata alone gives you a schema browser, which engineers already have. Operational metadata alone gives you a dashboard. The catalog becomes valuable only when a person searching for "net revenue" can move from the business term to the physical column, see whether it refreshed on time, and find the owning team in one hop. Design the entry around that journey rather than around the fields your tool happens to ingest.

Metadata typeSource of truthUpdate cadenceHuman contribution
TechnicalWarehouse and table formatOn schema changeRarely
OperationalOrchestrator and query historyContinuousNever
BusinessTeam-maintained glossaryOn metric changeDefinitions and caveats
OwnershipTeam registry or service catalogueOn team changeApprovals
ClassificationScanning plus policyOn ingestionReview exceptions

What a catalog entry must contain

An entry is useful when it answers five questions without a second lookup: what is this, who owns it, is it currently trustworthy, what depends on it, and how do I access it. Anything beyond that is optional enrichment, and adding it early is usually a mistake because it raises the cost of registering a dataset without improving discovery for the common case.

python
from dataclasses import dataclass, field
from datetime import datetime
from typing import Dict, List


@dataclass
class CatalogEntry:
    name: str
    domain: str
    description: str
    owner_team: str
    columns: Dict[str, str]
    tags: List[str] = field(default_factory=list)
    quality_score: float = 0.0
    last_fresh_at: datetime = field(default_factory=datetime.utcnow)
    upstream: List[str] = field(default_factory=list)
    downstream: List[str] = field(default_factory=list)

    def to_record(self) -> dict:
        return {
            "name": self.name,
            "domain": self.domain,
            "description": self.description,
            "owner": self.owner_team,
            "column_count": len(self.columns),
            "tags": self.tags,
            "trust": "green" if self.quality_score >= 90 else "amber" if self.quality_score >= 70 else "red",
            "freshness_hours": round((datetime.utcnow() - self.last_fresh_at).total_seconds() / 3600, 1),
            "upstream_count": len(self.upstream),
            "downstream_count": len(self.downstream),
        }


class DataCatalog:
    def __init__(self):
        self.entries: Dict[str, CatalogEntry] = {}

    def register(self, entry: CatalogEntry) -> None:
        self.entries[entry.name] = entry

    def search(self, query: str = "", tags: list = None, domain: str = None) -> list:
        results = list(self.entries.values())
        if query:
            q = query.lower()
            results = [e for e in results if q in e.name.lower() or q in e.description.lower()]
        if tags:
            results = [e for e in results if set(tags) & set(e.tags)]
        if domain:
            results = [e for e in results if e.domain == domain]
        return sorted(results, key=lambda e: e.quality_score, reverse=True)

Note that search ranks by quality score rather than alphabetically. Ranking by trust is what makes the catalog self-correcting: teams notice when their datasets surface low in results, and that pressure does more for freshness than any reminder email.

Classifying columns automatically

Manual tagging does not survive a thousand new columns a quarter. Classify on ingestion instead, using two signals that are cheap and surprisingly accurate together: the column name and the observed values. Names leak intent, values confirm it, and requiring both reduces false positives that would otherwise force analysts to request approvals for harmless fields.

python
import re
from typing import List


PATTERNS = {
    "email": r"^[\w\.-]+@[\w\.-]+\.\w+$",
    "phone": r"^\+?\d[\d\s\-\(\)]{9,}$",
    "ssn": r"^\d{3}-\d{2}-\d{4}$",
    "credit_card": r"^\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}$",
}

NAME_HINTS = {
    "email": "email",
    "mail": "email",
    "ssn": "ssn",
    "phone": "phone",
    "mobile": "phone",
    "card": "credit_card",
    "passport": "passport",
}


class ColumnClassifier:
    def classify(self, column_name: str, sample_values: list) -> List[str]:
        tags = set()
        lowered = column_name.lower()
        for hint, label in NAME_HINTS.items():
            if hint in lowered:
                tags.add(label)
                tags.add("pii")
        if sample_values:
            for label, pattern in PATTERNS.items():
                hits = sum(1 for v in sample_values if re.match(pattern, str(v)))
                if hits / len(sample_values) > 0.8:
                    tags.add(label)
                    tags.add("pii")
        if not tags:
            tags.add("internal")
        return sorted(tags)

    def classify_frame(self, frame, sample_size: int = 100) -> dict:
        report = {}
        for column in frame.columns:
            sample = frame[column].dropna().head(sample_size).tolist()
            report[column] = self.classify(column, sample)
        return report

Push the result into the catalog at write time and enforce policy at read time. Tagging at write means the classification travels with the data into every copy, which is what prevents a sensitive column from becoming unknown the moment it is exported to a new environment.

Lineage as the query that answers what breaks

Lineage is metadata with the highest return, because it is what converts a schema change from a gamble into a plan. Given a column you want to rename, lineage tells you which tables consume it, which models read those tables, and which dashboards sit at the end of the chain. Without it the only way to find out is to make the change and wait.

python
from collections import defaultdict, deque


class LineageGraph:
    def __init__(self):
        self.edges = defaultdict(set)

    def add_edge(self, upstream: str, downstream: str) -> None:
        self.edges[upstream].add(downstream)

    def impact(self, dataset: str) -> dict:
        seen = set()
        queue = deque(self.edges.get(dataset, []))
        while queue:
            node = queue.popleft()
            if node in seen:
                continue
            seen.add(node)
            queue.extend(self.edges.get(node, []))
        return {
            "dataset": dataset,
            "direct_consumers": sorted(self.edges.get(dataset, [])),
            "transitive_consumers": sorted(seen),
            "blast_radius": len(seen),
        }

    def roots(self, dataset: str) -> list:
        parents = {k for k, v in self.edges.items() if dataset in v}
        return sorted(parents)

Ask two questions of every lineage system. How complete is it, measured as the fraction of published tables that have at least one upstream and one downstream edge? And how fresh is it, measured by how quickly a new job appears after deployment? A lineage graph that is eighty percent complete will silently omit exactly the dependency you needed during an incident, which is worse than having none because it invites false confidence.

Metadata-driven pipelines

Once the catalog knows the schema, the owner and the expectations, a surprising amount of pipeline code becomes generatable. Landing a new source becomes a configuration: source connection, target path, schedule and contract reference. Documenting the output becomes free, because the entry is built from what the pipeline already emitted. Even tests can be derived from the contract rather than written per table.

The practical boundary is worth stating. Generate the repetitive eighty percent: ingestion wrappers, schema comparisons, freshness monitors, documentation stubs and standard tests. Hand-write the twenty percent that encodes business meaning: joins, grain decisions and metric definitions. Attempts to generate the second category produce pipelines that are technically correct and semantically empty, which is the most expensive kind of wrong in a warehouse.

Keeping it fresh without a steward army

Sustainability comes from removing scheduled human work wherever possible. Capture ownership from the deployment pipeline rather than a spreadsheet. Capture freshness and row counts from the orchestrator. Capture classification from the scanner. Capture lineage from the query log or the orchestration graph. What remains for a human is a small set of judgments: write the one-sentence description, flag the caveats, and resolve ambiguity when the scanner is unsure.

Review the residue quarterly rather than continuously. Teams change, datasets get renamed, and a description written two fiscal years ago may now be actively misleading. Tying the review to a team ritual that already exists, such as a quarterly planning session, is far more reliable than creating a new recurring chore that everyone will eventually snooze. Pair that review with a simple hygiene report: datasets with no owner, entries untouched for six months, and searches that returned nothing. Those three lists tell you where the human effort is actually needed instead of asking everyone to do more.

â„šī¸Measure adoption, not coverage

The metric that predicts whether a catalog survives is not how many datasets it contains. It is how many searches per week end with someone opening a dataset they had not used before, and how often an incident record links back to a lineage page.

Common Mistakes

Relying on humans to keep descriptions current

Fix: Capture structure and activity automatically and ask humans only for intent and caveats

Tagging personal data manually at review time

Fix: Classify on ingestion from name and value patterns, then enforce at read time

A lineage graph missing most tables

Fix: Measure completeness and freshness, and fail deployments that publish without lineage events

Ranking search results alphabetically

Fix: Rank by quality score so trust problems are visible to the teams who own them

Best Practices

  • Design the catalog entry around the five questions a consumer actually asks
  • Classify at write time so tags travel with every copy of the data
  • Report lineage completeness and freshness as first-class health metrics
  • Generate the repetitive pipeline boilerplate and hand-write only business semantics
  • Tie metadata review to an existing quarterly ritual instead of a new chore

Interview Questions

Q1: How would you build a catalog for a hundred thousand datasets?

Auto-register from the orchestration graph and query log, classify by scanning, inherit ownership from deployment metadata, and reserve human input for descriptions of the datasets that actually see traffic.

Q2: How do you keep metadata fresh as schemas evolve?

Make schema events a build artifact: compare the published schema to the registered one on every run, fail on unapproved differences, and update the entry in the same change.

Q3: What is the difference between metadata management and data governance?

Metadata management is the technical problem of capturing and serving descriptions, lineage and activity. Governance is the policy layer that decides who may do what with the data those descriptions describe.

Q4: Design a discovery experience for non-technical users.

Search in business language over the glossary, surface trust and freshness before the schema, show sample values and an owner, and provide a one-click path to a governed extract rather than raw table access.

Q5: How do you measure whether a catalog is succeeding?

Search-to-open conversion, share of datasets with an owner and a recent description, lineage completeness, and incident records that reference a catalog page during diagnosis.

Key Takeaways

  • Technical, operational and business metadata have different sources and owners
  • Design entries around the five questions a consumer asks, not around tool fields
  • Classify columns on ingestion from name plus value signals, then enforce at read time
  • Lineage converts schema changes from gambles into plans, so measure its completeness
  • Generate boilerplate pipelines from metadata and hand-write only business meaning
  • Adoption metrics predict survival better than coverage metrics
🔒

Premium Content

Metadata Management: Catalogs, Lineage, Discovery

You've previewed the first section. Unlock this full lesson and 900+ advanced tutorials with a Premium plan.

đŸŽ¯End-to-end Projects
đŸ’ŧInterview Prep
📜Certificates
🤝Community Access

Already a member? Log in

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-13

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement