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

# Overview

> What Pattern metrics are in Prizm — auto-discover the structural format template of column values to detect format violations and drift.

<script type="application/ld+json">
  {`{
            "@context": "https://schema.org",
            "@type": "TechArticle",
            "headline": "Pattern Metrics Overview",
            "description": "What Pattern metrics are in Prizm - auto-discover the structural format template of column values to detect format violations and drift.",
            "url": "https://docs.dqlabs.ai/architecture/metrics/pattern/overview",
            "publisher": {
              "@type": "Organization",
              "name": "DQLabs Inc",
              "logo": "https://media.brand.dev/332adc35-5bc4-4d2b-bf78-256aa4a5e414.svg"
            }
            }`}
</script>

## What is a Pattern metric?

Pattern metrics identify the **structural format template of values in a column** — auto-discovered from actual data. They detect format violations, encoding changes, and structural drift at the value-format level, not just the data-type level.

**Type:** Configurable — Pattern metrics are part of the Structural (Advanced) profile. They are enabled per column through the Configure Structural Metrics panel.

Pattern metrics answer the question: *Do the values in this column conform to their expected format?*

### Metrics

| Metric        | Level     | Description                                                                                                                                                                                                                                                                                        |
| ------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Short Pattern | Attribute | A compressed representation of the value format where each character class is collapsed to a single token (e.g., `A9A-9999` for a product code like `B2B-1234`). Short patterns capture the essential format shape — ideal for detecting format class changes across a column.                     |
| Long Pattern  | Attribute | A character-by-character format representation where each position is mapped to its character class (e.g., `ANNN-NNNN` where `A` = alpha, `N` = numeric). Long patterns provide precise positional matching — useful for fixed-format fields like national IDs, account numbers, and date strings. |

### How pattern monitoring works

On the first profiling run, Prizm auto-discovers the dominant short and long patterns in the column and establishes them as the baseline. On subsequent runs, it reports the distribution of patterns observed — including any new patterns not present at baseline. An alert fires when a new pattern appears or when the proportion of values matching the baseline pattern drops below the configured tolerance.

Patterns are detected automatically — no user-defined regex is required. For regex-based format validation, see the [Frequency — Regular Expressions](/architecture/metrics/frequency/overview) metric.

### Example use cases

**Product SKU format change:** A supplier changes their product code format from `ABC-1234` (Short Pattern: `AAA-9999`) to `AB-12345` (Short Pattern: `AA-99999`). Prizm detects the new pattern immediately and alerts — giving the integration team time to update their SKU parsing logic before the catalog breaks.

**Date format inconsistency:** A CSV ingestion pipeline begins mixing ISO date format (`2024-01-15`, Long Pattern: `NNNN-NN-NN`) with US date format (`01/15/2024`, Long Pattern: `NN/NN/NNNN`) in the same `event_date` column. Prizm alerts on the new Long Pattern, flagging the inconsistency before it causes silent type cast failures in downstream models.

<Note>
  Pattern metrics require at least one completed profiling run to establish a baseline. New patterns appearing in subsequent runs are flagged immediately — they do not silently replace the baseline. To update the baseline after an intentional format change, acknowledge the alert in Prizm.
</Note>

<Card title="Configure" icon="sliders" href="/architecture/metrics/pattern/configure">
  Enable Pattern metrics per column, set thresholds, and manage baseline updates.
</Card>
