---
title: "data_quality_pipeline"
description: "Examine, detect, classify, measure, clean, verify, and audit data quality issues."
canonical: "https://acs.synapti.ai/workflows/data-quality-pipeline/"
last_updated: "2026-11-16T03:28:14Z"
---

# Examine, detect, classify, measure, clean, verify, and audit data quality issues.

Generated from [schemas/workflow_catalog.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/workflow_catalog.yaml) at commit 18c38b74ac21.

- Workflow id: `data_quality_pipeline`
- Risk: low
- Catalog: reference workflows
- Declares Standard 1.1.0
- Steps: 7

Data quality pipeline inspired by OASF Category 9 (Data Engineering).
Examines raw data, detects quality problems, classifies issue types,
computes quality metrics, produces a cleaned copy of the data with
cleaning transformations, verifies the cleaned data against quality
thresholds, and records all transformations applied and the verdict for
reproducibility. No step mutates: the transform returns the cleaned data
as its output and leaves the raw data untouched, so the pipeline needs no
checkpoint or rollback. Writing the cleaned data anywhere is left to the
caller, which should do so only on a PASS verdict.

**Figure: Steps of data_quality_pipeline: 7 steps.** Read top to bottom: no step changes state; steps 1 and 6 say what to do on failure; and the highest step risk is low, at steps 1, 2, 3, 4, 5, 6 and 7.

| # | Capability | Layer | Role | Gates | On failure | Reads from | Risk |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | `observe` | PERCEIVE |  |  | stop |  | low |
| 2 | `detect` | UNDERSTAND |  |  |  | 1 | low |
| 3 | `classify` | UNDERSTAND |  |  |  | 2 | low |
| 4 | `measure` | UNDERSTAND |  |  |  | 2 | low |
| 5 | `transform` | SYNTHESIZE |  |  |  | 2, 3 | low |
| 6 | `verify` | VERIFY | verify |  | stop | 5 | low |
| 7 | `audit` | VERIFY |  |  |  | 2, 4, 5, 6 | low |

## Inputs

**Figure: Inputs of data_quality_pipeline.** 1 input, 1 required (filled pin) and 0 optional (outlined pin), with 3 named fields inside them.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `raw_data` | object | Yes | The raw data to be quality-checked and cleaned |
| `raw_data.format` | string | No |  |
| `raw_data.schema` | object | No |  |
| `raw_data.quality_thresholds` | object | No |  |

## Steps

1. [`observe`](https://acs.synapti.ai/capabilities/observe/index.md): Examine raw data structure, schema, and sample values. Stores `observe_out`. (risk low)
2. [`detect`](https://acs.synapti.ai/capabilities/detect/index.md): Find quality problems such as nulls, outliers, duplicates, and format issues. Stores `detect_out`. (risk low)
3. [`classify`](https://acs.synapti.ai/capabilities/classify/index.md): Categorize detected issues by type and severity. Stores `classify_out`. (risk low)
4. [`measure`](https://acs.synapti.ai/capabilities/measure/index.md): Compute quality metrics (completeness, consistency, accuracy, timeliness). Stores `measure_out`. (risk low)
5. [`transform`](https://acs.synapti.ai/capabilities/transform/index.md): Produce a cleaned copy of the data that fixes the detected quality issues; the raw data is not modified. Stores `transform_out`. (risk low)
6. [`verify`](https://acs.synapti.ai/capabilities/verify/index.md): Validate cleaned data meets quality thresholds. Stores `verify_out`. (risk low)
7. [`audit`](https://acs.synapti.ai/capabilities/audit/index.md): Record all transformations applied, quality metrics, and the verification verdict. Stores `audit_out`. (risk low)

## Data flow

**Figure: Which step reads which stored output.** 6 steps read the output of earlier steps, 10 reads in all; step 7 (audit) reads the most, from 4 steps.

- Step 2 reads from step 1.
- Step 3 reads from step 2.
- Step 4 reads from step 2.
- Step 5 reads from steps 2 and 3.
- Step 6 reads from step 5.
- Step 7 reads from steps 2, 4, 5 and 6.

## Risk

Declared, computed and highest step risk are all low; the highest-risk step is step 1 (observe), with 6 others at the same level. The step map above gives each step's risk.

## Success criteria

- Raw data examined for quality issues
- Issues detected and classified
- Quality metrics computed
- Cleaned copy of the data produced; raw data left unmodified
- Cleaned data verified against thresholds
- All transformations recorded for audit

## Validate it

```sh
python tools/validate_workflows.py --catalog schemas/workflow_catalog.yaml
```

## Workflow YAML

```yaml
data_quality_pipeline:
  goal: Examine, detect, classify, measure, clean, verify, and audit data quality issues.
  risk: low
  description: |
    Data quality pipeline inspired by OASF Category 9 (Data Engineering).
    Examines raw data, detects quality problems, classifies issue types,
    computes quality metrics, produces a cleaned copy of the data with
    cleaning transformations, verifies the cleaned data against quality
    thresholds, and records all transformations applied and the verdict for
    reproducibility. No step mutates: the transform returns the cleaned data
    as its output and leaves the raw data untouched, so the pipeline needs no
    checkpoint or rollback. Writing the cleaned data anywhere is left to the
    caller, which should do so only on a PASS verdict.
  success:
  - Raw data examined for quality issues
  - Issues detected and classified
  - Quality metrics computed
  - Cleaned copy of the data produced; raw data left unmodified
  - Cleaned data verified against thresholds
  - All transformations recorded for audit
  steps:
  - capability: observe
    purpose: Examine raw data structure, schema, and sample values.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: observe_out
    input_bindings:
      target: ${raw_data.format}
    failure_modes:
    - condition: Unable to read or parse data
      on_error: R402
      action: stop
      recovery: Report format incompatibility and request data in supported format.
  - capability: detect
    purpose: Find quality problems such as nulls, outliers, duplicates, and format issues.
    domain: data_issue
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: detect_out
    input_bindings:
      data: "${observe_out.observation: object}"
      pattern: data_quality_issue
    failure_modes: []
  - capability: classify
    purpose: Categorize detected issues by type and severity.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: classify_out
    input_bindings:
      item: "${detect_out.matches: array<object>}"
    failure_modes: []
  - capability: measure
    purpose: Compute quality metrics (completeness, consistency, accuracy, timeliness).
    domain: quality
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: measure_out
    input_bindings:
      target: "${detect_out.matches: array<object>}"
      metric: quality
    failure_modes: []
  - capability: transform
    purpose: Produce a cleaned copy of the data that fixes the detected quality issues; the raw data is not modified.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: transform_out
    input_bindings:
      input: ${raw_data}
      target_format: cleaned
      options:
        issues: "${detect_out.matches: array<object>}"
        issue_types: "${classify_out.labels: array<object>}"
  - capability: verify
    purpose: Validate cleaned data meets quality thresholds.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry:
      max: 2
      backoff: exponential
    store_as: verify_out
    input_bindings:
      conditions: ["quality_thresholds_met"]
      target: "${transform_out.output: object}"
    # A FAIL verdict is not a step error: the run goes on to the audit, which
    # records it. Nothing was written, so there is nothing to roll back.
    failure_modes:
    - condition: Verification could not run (timed out or failed after its retries)
      on_error: [R401, R402]
      action: stop
      recovery: The raw data was never modified, so nothing is rolled back; the run ends with the verify step's error, and the audit step does not run; the run record the host keeps (STANDARD v1.2 §5.19.8) records the failure.
  - capability: audit
    purpose: Record all transformations applied, quality metrics, and the verification verdict.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: audit_out
    input_bindings:
      event:
        type: data_quality_pipeline
        detected: ${detect_out.detected}
        quality_score: ${measure_out.value}
        transformations: "${transform_out.output: object}"
        verification: ${verify_out.passed}
    failure_modes: []
  risk_propagation:
    strategy: max_step_risk
    computed_risk: low
  data_flow:
    pattern: step_outputs_are_addressable
    rule: Each step output is stored under store_as and may be referenced by later steps.
  inputs:
    raw_data:
      type: object
      required: true
      description: The raw data to be quality-checked and cleaned
      properties:
        format:
          type: string
        schema:
          type: object
        quality_thresholds:
          type: object
```
