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

Microsoft Purview: Data Map, Lineage & Classification

Azure Data EngineeringMicrosoft Purview⭐ Premium

Prerequisites

  • !What metadata means in an analytical context
  • !A data lake or warehouse you have actually used
  • !Rough awareness that pipelines move data between systems

What You'll Learn

  • 1Describe the Purview data map, scan and collection model
  • 2Configure classification rules so sensitive columns are found automatically
  • 3Read and trust a lineage graph, and know where it will have gaps
  • 4Scope a collection so a scan does not crawl the whole estate
  • 5Explain what governance work Purview does not do for you

The data map is a graph, not a catalogue page

Microsoft Purview is built around a data map: a graph of datasets, processes, relationships and classifications, populated by scanners rather than by people typing descriptions. That distinction drives everything. A catalogue maintained by hand drifts from reality within weeks; a map built by scans reflects what is on storage today, at the cost of only knowing what a scanner is allowed to see.

A scan walks a source, discovers assets such as tables, folders and files, and registers them with technical metadata: schema, formats, sizes, update times. It then applies classification rules to identify sensitive content by pattern, such as credit card numbers or email addresses, and can infer business terms through rules you define. All of this lands in the map, where it is searchable and can be linked into lineage.

The unit of connection is a collection. A collection is a boundary that groups sources and controls what a scan may reach. The practical habit is one collection per domain or per environment, so the marketing team's scan does not walk the finance lake and the production scan does not crawl development copies that contain synthetic data nobody has classified.

ObjectWhat it isPopulated byYou use it to
SourceA registered system to scanManual registrationTell Purview where to look
CollectionScope boundary for a sourceManual groupingLimit blast radius of a scan
ScanA scheduled crawlSchedule or on demandRefresh technical metadata
AssetA discovered table, folder or fileScan outputSearch, classify and govern
ClassificationA detected sensitive patternRule engineReport on exposure
LineageAsset-to-asset movementIntegration eventsTrace impact upstream and down

Classification rules and what they catch

Classification in Purview works by rules that match patterns in column names and data values. Some rules ship out of the box, such as international standard identifiers, and you can add custom rules expressed as regular expressions or supported formats. Rules are evaluated during a scan, and a match produces a classification label attached to the column.

The subtlety is that classification samples data rather than reading every row. A column holding ten million values with only the first thousand containing a credit card number may be missed. For high-assurance work the answer is not to tune the rule harder; it is to combine automated classification with a data quality or masking policy enforced at the serving layer, so correctness does not depend on a probabilistic scan.

Classification also drives retention decisions. Once a column is labelled as containing personal data, the retention policy attached to that label can require the underlying asset to be deleted or anonymised after a period, and the map lets you find every asset carrying the label without knowing where they are.

{
  "name": "scan-adls-curated",
  "properties": {
    "collection": { "type": "System.Collection", "referenceName": "coll-sales" },
    "scanLevel": "Incremental",
    "credentials": {
      "referenceName": "ps-data-reader",
      "type": "IntegrationRuntime"
    },
    "scanRulesSet": {
      "type": "System.ScanRulesSet",
      "referenceName": "AzureDataLakeStorageV2"
    },
    "expressions": []
  }
}

An incremental scan is the default you want for a lake that changes constantly. It reads only what changed since the last run, which keeps scan cost and map staleness both low. A full rescan belongs on a monthly schedule, catching schema drift that an incremental pass would treat as unchanged.

Lineage: how it is captured and where it lies

Lineage records that data moved from A to B, usually with the transformation description attached. Purview captures it from integrations that emit lineage events rather than by reading your SQL. Azure Data Factory and Synapse pipelines publish lineage when you connect them, Databricks jobs can emit lineage through the lineage API, and Power BI captures report-to-dataset relationships.

The gap to state honestly in an interview: a Spark job running arbitrary code, a manual notebook export, or a pipeline that writes files without going through a connected activity produces no lineage. The map then shows a clean graph that omits a real hop. Governance teams who treat lineage as complete start making impact analyses that are confidently wrong.

python
# Emit lineage from a job the scanner cannot see
import urllib.request
import json

def publish_lineage(source_name, target_name, operation, run_id):
    payload = {
        "runId": run_id,
        "source": {"typeName": "azure_datalake_gen2_path", "attributes": {"qualifiedName": source_name}},
        "target": {"typeName": "azure_datalake_gen2_path", "attributes": {"qualifiedName": target_name}},
        "operation": operation,
    }
    request = urllib.request.Request(
        "https://your-purview.account.purview.azure.com/lineage/API/1.0/lineage",
        data=json.dumps(payload).encode(),
        headers={"Content-Type": "application/json", "Authorization": "Bearer " + get_token()},
        method="POST",
    )
    with urllib.request.urlopen(request) as response:
        return response.status

Once lineage exists, its highest-value use is impact analysis. Before changing a column, search the graph for every downstream consumer, then decide whether the change is additive or breaking. Without that graph the same question is answered by asking three teams in a meeting and hoping nobody was on holiday.

Scanning at scale without burning the budget

A scan of a large lake can take hours and cost real money in the integration runtime that runs it. Three settings control this. Scan scope decides whether you crawl everything or a named path, incremental mode decides whether you re-read unchanged data, and the scan's recurrence decides how fresh the map stays.

For a lake with millions of files, scanning everything every night is usually the wrong shape. A better pattern is a frequent incremental scan on the curated zone, a daily scan on raw, and a weekly full scan across the estate to catch structural drift. That combination keeps the map accurate where people actually search while bounding cost.

Scan cadenceScopeTypical duration driverYou keep it for
Hourly incrementalOne curated folderChanged files onlyNear-real-time catalogue freshness
Daily incrementalRaw and curated zonesVolume of new dataNormal operations
Weekly fullEntire collectionTotal file countCatching schema drift
Ad hoc fullOne sourceTotal file countBefore a migration or audit

What Purview does not do

Purview discovers, classifies and maps. It does not enforce access. Removing a user's permission still happens in Azure RBAC or in the warehouse's grant model; Purview will tell you who has access through its access control view, but it is not the gate. Teams that expect Purview to block a query are disappointed the first time someone reads data they should not.

It also does not transform data, test it, or monitor pipeline health. Those live in ADF or Fabric for orchestration, in dbt or Spark tests for quality, and in Azure Monitor for operations. Treating Purview as the whole governance programme produces a beautiful map with no enforcement behind it.

The useful framing is that Purview is the evidence layer. It shows what exists, what is sensitive, where it came from and who touches it. The control layer is identity, policy and code review. Both layers are needed for a governance claim you can defend in an audit.

A realistic first ninety days

Register sources before writing any classification rules, because a map with nothing in it cannot be evaluated. Connect ADF and Synapse first, since lineage arrives almost for free. Then run a full scan on the curated zone to establish a baseline of what is already sensitive. Only after that should you write custom business-term rules, because you will now have real column names to pattern against rather than guesses.

Finally, agree ownership. An asset without an owner is an asset nobody maintains, and the map makes this visible: unowned assets are the fastest way to show a platform team where their documentation effort should go next.

Common Mistakes

Registering every source and enabling full scans on all of them on day one

Fix: Start with collections per domain, scan the curated zone incrementally, and expand once the baseline is clean

Treating lineage as complete because the graph looks populated

Fix: Document which jobs publish lineage and audit for manual or unconnected paths that never emit events

Expecting classification to guarantee every sensitive value is labelled

Fix: Combine automated classification with masking or policy enforced where data is served, since sampling can miss rare values

Confusing Purview's access view with access enforcement

Fix: Enforce permissions with RBAC and warehouse grants; use Purview to see and review them

Best Practices

  • Connect pipeline tooling early so lineage arrives automatically instead of being retrofitted
  • Separate collections by domain so scans stay scoped and results stay attributable
  • Pair every classification label with a retention and handling rule someone owns
  • Run a periodic full scan to catch schema drift that incremental scans ignore

Interview Questions

Q1: What is the Purview data map?

A graph of datasets, processes and relationships populated by scanners. It stores technical metadata, classifications and lineage so assets can be searched and governed centrally.

Q2: How does Purview discover sensitive data?

Classification rules match column names and sampled values against known patterns such as identifiers and card numbers, and matches are attached as labels to the columns during a scan.

Q3: Where does lineage come from?

From integrations that emit lineage events, such as Data Factory, Synapse, Power BI and Databricks jobs configured to publish. Code that runs outside those paths produces no lineage and leaves gaps.

Q4: Does Purview enforce who can read a table?

No. It surfaces access information for review, but enforcement happens in Azure RBAC or in the warehouse's grant model.

Q5: How would you scan a multi-terabyte lake without excessive cost?

Scope scans with collections, run frequent incremental scans on hot zones, less frequent full scans for drift, and choose an appropriately sized integration runtime for the crawl.

Key Takeaways

  • The data map is scan-populated, so accuracy depends on what you connect and how often
  • Classification samples data, which is why it informs risk rather than guaranteeing it
  • Lineage is only as complete as the integrations emitting it, and gaps are the normal case
  • Collections scope a scan; without them a scan walks more than you intended
  • Purview is the evidence layer, while identity and policy are the enforcement layer
🔒

Premium Content

Microsoft Purview: Data Map, Lineage & Classification

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-12

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement