> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-Classification in OpenMetadata

> Learn how OpenMetadata automatically detects and tags sensitive data like PII using column name scanning and NLP-based entity recognition.

# Overview

Auto-Classification is an OpenMetadata workflow that automatically detects and tags sensitive data — such as PII — across your database columns. It removes the need for manual tagging by scanning both column names and sample data during ingestion, then applying or suggesting tags like `PII.Sensitive` and `PII.NonSensitive`.

> [!WARNING]
>
> External Storage for Sample Data is deprecated and planned for removal in OpenMetadata 2.1. It remains available in this release for existing deployments, but don't enable it in new deployments. Before upgrading to 2.1, remove sample-data storage configuration from database service, database, and database schema settings.

## How It Works

Auto-Classification uses two complementary detection approaches:

* **Column Name Scanner**: Validates column names against a set of regex rules that identify common sensitive patterns — email addresses, names, SSNs, bank account numbers, and similar fields.

  For example, columns `email` and `full_name` are auto-tagged as `PII.Sensitive` based on their column names.

  ![Columns with recognizable sensitive names auto-tagged as PII Sensitive](https://mintcdn.com/openmetadata/B6U1glZKT4PT9EFR/public/images/how-to-guides/governance/auto-pii1.png?fit=max\&auto=format\&n=B6U1glZKT4PT9EFR\&q=85\&s=ba3b19ab9fe16e8a0f8a487997dbd1eb)

* **Entity Recognition**: If sample data ingestion is enabled, scans the actual row values using an NLP-based entity recognition engine. This catches sensitive data even when the column name is generic or ambiguous. The `confidence` parameter (0–100, default `80`) controls the minimum score required to tag a column as `PII.Sensitive`.

  If a column already has a `PII` tag, it is skipped during execution.

  For example, the column `I_FORMULATION` is also tagged as `PII.Sensitive`, even though its name gives no indication of sensitive content.

  ![Column with an ambiguous name tagged as PII Sensitive](https://mintcdn.com/openmetadata/B6U1glZKT4PT9EFR/public/images/how-to-guides/governance/auto-pii2.png?fit=max\&auto=format\&n=B6U1glZKT4PT9EFR\&q=85\&s=adfcfcde6e4506d561db27d727ce622f)

  Inspecting the **Sample Data** tab reveals that the actual row values contain sensitive information, which the entity recognition engine detected. This shows that auto-classification works beyond column names and relies on the data itself when sample ingestion is enabled.

  ![Sample data showing sensitive values that triggered auto-classification](https://mintcdn.com/openmetadata/B6U1glZKT4PT9EFR/public/images/how-to-guides/governance/auto-pii3.png?fit=max\&auto=format\&n=B6U1glZKT4PT9EFR\&q=85\&s=4124636128cb4a34ba5eb4d7c7c06533)

## How Content Confidence Is Calculated

Starting in OpenMetadata 2.0.3, content confidence uses the highest score from any eligible recognizer (a detection rule that matches sensitive values) across sampled values, rather than averaging scores over all sampled rows. A strong match is therefore not diluted by rows without sensitive data.

The spaCy language model identifies named entities in text. Its guesses for people, locations, and group affiliations require at least two distinct matches of the same entity type when they have no supporting context. Repeating the same guessed value doesn't provide corroboration. Pattern recognizers and context-enhanced named-entity matches don't require this extra corroboration. The highest remaining score is compared with the configured confidence thresholds: the pipeline's `confidence` and the classification's `minimumConfidence`.

## Tag Mapping

Tag mapping lets you link two tags so that applying one automatically applies the other. When two related tags are associated, any time the first tag is applied to a data asset, the second tag is applied automatically — keeping classifications consistent across taxonomies without extra manual steps.

For example, applying `Personal Data.Personal` automatically applies `Data Classification.Confidential`, ensuring that privacy and sensitivity classifications always stay in sync. Tag mappings are configured in the backend and are not available through the OpenMetadata UI.

## Set Up Auto-Classification

> [card] [Workflow](https://docs.open-metadata.org/v2.0.x/how-to-guides/data-governance/classification/auto-classification/workflow.md)
>
> Add an Auto Classification Agent to a database service directly from the OpenMetadata UI.

> [card] [External Workflow](https://docs.open-metadata.org/v2.0.x/how-to-guides/data-governance/classification/auto-classification/external-workflow.md)
>
> Run the Auto Classification Workflow externally using a YAML pipeline configuration.

> [card] [Auto PII Tagging](https://docs.open-metadata.org/v2.0.x/how-to-guides/data-governance/classification/auto-classification/auto-pii-tagging.md)
>
> Understand the tagging logic and troubleshoot common issues like SSL certificate errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.