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

Microsoft Purview Scanning, Classification, and Data Lineage

Azure Data EngineeringPurview Deep Dive⭐ Premium
Azure Data Engineering

Knowing what data you have, and where it came from

13 min read📘Intermediate

Prerequisites

  • !Azure Data Lake Gen2 and Synapse workspace basics
  • !The difference between technical metadata and business metadata
  • !Power BI workspaces and dataset concepts

What You'll Learn

  • 1Plan and schedule scans that stay inside budget
  • 2Write custom classifiers for organization-specific sensitive data
  • 3Read and act on end-to-end lineage graphs
  • 4Connect business glossary terms to technical assets for discoverability

Why cataloging fails without a scanning plan

Purview's core value is a live map of every data asset, its classification, and its lineage, but the map is only as good as the scanning discipline behind it. A common failure is scanning everything on a nightly cadence, which works beautifully for two weeks and then surprises finance with a bill proportional to the square of your data estate. Scanning consumes capacity units that scale with the amount of metadata cataloged and the frequency of the scan, so the plan matters more than the tool. Group sources into collections that mirror business domains, set incremental scans where the source supports them, and reserve full scans for initial onboarding and post-migration validation.

The second failure is scanning without review. Automated classification flags candidate sensitive columns, but someone must validate them, because a false negative on a customer email column is a compliance incident, and a false positive on a product description column is wasted remediation effort. Treat classification results as a work queue with owners and SLAs, not as a fire-and-forget report.

Source typeWhat Purview extractsIncremental scan supportCommon gotcha
ADLS Gen2Schemas, classifications, sample dataYes, by path or last-modifiedLarge numbers of small files inflate scan time
Synapse SQLTables, columns, views, lineageYesManaged private endpoints needed for secured workspaces
Power BIDatasets, reports, lineage to sourcesYesRequires tenant-level admin consent
Azure SQL DBSchemas, classifications, lineageYesFirewall rules must allow Purview's managed VNet
Databricks UnityTables, volumes, lineageYesRequires metastore-level integration configuration

Building custom classifiers for domain data

The built-in classifiers know passports, credit card numbers, and the usual suspects. They do not know your internal customer codes, your proprietary asset IDs, or the patient MRN format your hospital system standardized on in 2011. Custom classifiers close that gap. A regex classifier matches a pattern you supply; a dictionary classifier matches a list of known values; a file-extension classifier catches formats your industry uses. The precision parameter is the lever that balances recall against noise, and setting it too low floods the review queue with false positives that reviewers learn to ignore, which is worse than having no classifier at all because it trains humans to dismiss the signal.

python
from azure.identity import DefaultAzureCredential
from azure.purview.datamap import PurviewDataMapClient

credential = DefaultAzureCredential()
client = PurviewDataMapClient(
    credential=credential,
    account_name="purview-dataeng-prod",
)

def create_customer_code_classifier():
    """Register a regex classifier for internal customer codes like CUST-004512."""
    rule = {
        "name": "InternalCustomerCodeClassifier",
        "description": "Detects internal customer identifiers in operational stores",
        "ruleType": "Regex",
        "pattern": r"CUST-\d{6}",
        "columnNamePatterns": ["customer_id", "cust_code", "client_ref"],
        "minPrecision": 0.85,
    }
    created = client.classification.create_classification_rule(rule=rule)
    print(f"registered classifier {created.name}")

def list_classification_hits(asset_guid: str):
    """Review what the service flagged on a specific asset."""
    classifications = client.classification.list_classifications(
        entity_guid=asset_guid
    )
    for c in classifications:
        print(f"{c.classificationName} on {c.entityGuid} confidence={c.confidence}")

create_customer_code_classifier()

After registering a classifier, bind it to the relevant scan ruleset so it runs automatically on subsequent scans. Leaving it unbound means it exists in the catalog but never executes, which is a common source of "we created the classifier and nothing changed" tickets.

Lineage: from source column to report visual

Lineage answers the question every incident review eventually asks: if this number is wrong, what upstream fed it, and what downstream consumed it. Purview captures lineage automatically from integration points including Data Factory pipelines, Databricks notebooks, Synapse pipelines, and Power BI datasets. The lineage graph connects source datasets through transformation activities to destination datasets, and at its best extends all the way to the report visual a stakeholder screenshots into a Slack channel during an outage.

Reading lineage is a two-directional exercise. Downstream impact analysis tells you what breaks if you change a column, which belongs in every schema-change review. Upstream root-cause analysis tells you where a bad value originated, which is how you discover that a vendor file arrived with swapped columns three days ago. The practical skill is querying the lineage API rather than clicking through the UI when you need to automate either direction.

python
def trace_lineage(entity_guid: str, direction: str = "Both") -> dict:
    """Walk upstream and downstream lineage for an entity and summarize hops."""
    lineage = client.lineage.get_lineage(
        entity_guid=entity_guid,
        direction=direction,
    )
    upstream = [
        e.guid for e in (lineage.upstream_entities or [])
    ]
    downstream = [
        e.guid for e in (lineage.downstream_entities or [])
    ]
    print(f"entity {entity_guid}: {len(upstream)} upstream, {len(downstream)} downstream")
    for guids, label in ((upstream, "UP"), (downstream, "DOWN")):
        for guid in guids[:10]:
            entity = client.entity.get_by_guid(entity_guid=guid)
            name = entity.get("displayName", guid)
            print(f"  {label}  {name}")
    return {"upstream": upstream, "downstream": downstream}

def find_report_impact(report_guid: str):
    """Which Power BI reports are affected by an upstream change."""
    result = trace_lineage(report_guid, direction="Both")
    affected = []
    for guid in result["upstream"]:
        entity = client.entity.get_by_guid(entity_guid=guid)
        if entity.get("typeName") in ("azure_datalake_gen2_path", "azure_synapse_notebook"):
            affected.append(entity.get("displayName", guid))
    return affected

The business glossary as the bridge to stakeholders

Technical metadata describes columns and tables; business glossary terms describe what the organization means by "active customer" or "net revenue." Purview's glossary lets you define a term once, assign it stewards, and link it to any number of technical assets. When a finance analyst searches for revenue, the glossary surfaces the certified dataset and the definition that finance signed off on, instead of the twelve uncertified copies that also match the keyword.

The cultural effect is larger than the technical one. A glossary with stewards and approval workflows creates a social contract around definitions. Without that contract, every team maintains its own mental model, and cross-team reports disagree in ways nobody can quickly reconcile. Start with a small set of high-value, high-ambiguity terms, get them adopted, and expand; a glossary that tries to define everything at once is abandoned before it delivers value.

Power BI integration and closing the loop

Connecting Power BI workspaces to Purview requires tenant admin consent and yields lineage from dataset to report, plus classification of the dataset's underlying columns. Once connected, a change to an ADLS source column that flows into a Power BI dataset surfaces in the lineage graph, so the report owner can be notified before the next scheduled refresh fails. This is the loop that makes cataloging operational rather than archival: the map updates as the estate changes, and the people who depend on the data are the ones who see the map.

Operational hygiene matters here too. Review scan status regularly, because a scan that silently failed three weeks ago leaves a growing blind spot. Archive or remove stale assets so the catalog reflects reality. And treat Purview's own capacity units as a budget line you monitor, not a surprise you absorb at the end of the quarter.

Collections, credentials, and the scanning checklist

Purview organizes scanned sources into collections, and collections are the unit of both access control and scan configuration. A collection per business domain means the finance collection can be owned by the finance data steward, scanned on a schedule that matches finance's change cadence, and governed by policies that reflect finance's regulatory obligations, without those choices leaking onto the engineering domain next door. The alternative, one flat collection with everything in it, works until the first time someone needs to grant catalog browsing rights to an external auditor for a single domain and discovers the permission boundary does not exist.

Credentials for scans deserve the same discipline as the data itself. A scan must authenticate to the source, usually with a managed identity or a service principal, and that identity needs only the permissions the scan requires, such as storage blob reader on the specific container, not on the account. Broad scan credentials that can read every container in the account turn Purview's own connectivity into an over-privileged path to sensitive data. Store any credential material in Key Vault, reference it from the scan configuration, and rotate it on the same schedule as other service credentials.

The operational checklist before calling a source "cataloged" includes verifying the scan completed without permission errors, reviewing the classification hits with the domain owner, confirming that expected assets appear with correct schemas, spot-checking lineage for one known pipeline, and scheduling the incremental cadence. Skipping the review steps is how catalogs fill with unclassified sensitive columns that nobody trusts, and an untrusted catalog is indistinguishable from no catalog at all when a compliance deadline arrives.

Common Mistakes

Scanning the entire data estate nightly without incremental configuration

Fix: Use incremental scans by path or modified timestamp, and reserve full scans for onboarding and post-migration validation

Setting custom classifier precision so low that the review queue fills with false positives

Fix: Start at 0.85 or higher, review the hits for a week, and only lower precision when you have evidence the real pattern is being missed

Creating glossary terms without assigning stewards or approval workflows

Fix: Assign a named steward per term and an approval step; unstewarded glossaries decay into unused metadata within a quarter

Treating a failed scan as a one-time notification to fix later

Fix: Alert on scan status changes and review the scan health dashboard weekly, because silent failures leave expanding blind spots in the catalog

Best Practices

  • Organize sources into collections that mirror business domains so scanning and access policies align with ownership
  • Review and approve classification results on a scheduled cadence with named owners
  • Query lineage programmatically for schema-change reviews instead of relying on manual UI inspection
  • Start the glossary with a small, high-ambiguity term set and expand only after adoption
  • Monitor Purview capacity unit consumption alongside other data platform costs

Interview Questions

Q1: How do you implement end-to-end lineage across a modern data stack?

Enable the native integrations for each tool in the flow: Data Factory for pipeline lineage, Databricks for notebook and table lineage, Synapse for SQL and pipeline lineage, and Power BI for dataset-to-report lineage. Schedule scans, then use the SDK to register lineage for custom transformation steps the connectors do not see.

Q2: What is the purpose of a custom classifier and when do you need one?

Custom classifiers detect organization-specific sensitive patterns that built-in classifiers miss, such as internal customer codes or proprietary asset IDs. You need one whenever your compliance scope includes identifiers that are not publicly standardized, and it must be bound to a scan ruleset to run automatically.

Q3: How does Purview support data governance beyond cataloging?

It combines automated discovery and classification with lineage, a stewarded business glossary, access policies, and compliance reporting. Together these let an organization demonstrate not just that data exists, but who owns it, what it means, where it flows, and who may see it.

Key Takeaways

  • Scan planning beats scan volume; incremental scans and collection-based organization keep both cost and noise manageable
  • Custom classifiers with sensible precision close the gap between built-in patterns and your actual compliance scope
  • Lineage is a two-directional tool: downstream for impact analysis, upstream for root-cause analysis
  • A stewarded glossary turns metadata into a social contract around definitions
  • Monitor scan health and capacity units like any other production dependency
🔒

Premium Content

Microsoft Purview Scanning, Classification, and Data Lineage

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