> ## 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.

# Breaking Changes - Data Quality | Official Documentation

> Data quality dimensions as entities, stricter test case validation, new failure threshold options, failed row samples, and pandas expression checks in OpenMetadata 2.1.

# Data Quality & Observability

Upgrading from 2.0 to 2.1 changes how test cases are validated and how data quality dimensions are
stored. Most other changes are additive.

## Data Quality Dimensions Are Now Managed Entities

> [!NOTE]
>
> **Breaking for typed clients, behavioral for everyone else.** Affects code generated from the 2.0
> schemas, the Python and Java SDKs, and scripts that set a test definition's dimension.

In 2.0, a dimension (such as Completeness or Accuracy) was one value from a fixed list. Each dimension
is now its own record. You can add to, rename, or recolor dimensions under **Settings** > **Preferences** > **Data Quality**.
OpenMetadata ships seven system dimensions that cannot be edited or deleted: Accuracy, Completeness, Consistency, Integrity,
SQL, Uniqueness, and Validity.

```diff theme={null}
  // testDefinition.dataQualityDimension
- "$ref": "#/definitions/dataQualityDimensions"   // fixed list of values
+ "$ref": "basic.json#/definitions/entityName"    // the name of any dimension, system or custom

  // testCase
+ "dataQualityDimension": { "$ref": "entityReference.json" }
```

What this means for you:

* `dataQualityDimension` on a test definition is now a plain name string, not an enum. Generated models
  that expected the old enum type must be regenerated.
* Test cases now carry their own `dataQualityDimension`. If you do not set one when you create a test
  case, it takes the dimension of its test definition. `CreateTestCaseRequest` accepts the new field.
* The upgrade first creates the system dimensions. It then gives every existing test case that has no dimension the one its test definition names.
  These test cases are marked as inherited, so reclassifying the definition later moves them too.
* Test cases that already have a dimension are left alone. Test cases whose definition has no dimension or names an unknown one stay without a dimension and appear under "No Dimension" in dashboards.
* If this step fails, the upgrade still finishes and the failure is only logged.

> [!NOTE]
>
> Regenerate any models or clients built from the 2.0 schemas. Code that compared a definition's
> dimension against the old list of values keeps working for the seven system names, but no longer sees
> an enum.

## New Test Cases Are Checked Against Their Definition

> [!NOTE]
>
> **Breaking for integrations that create test cases.** A request that used to be stored as sent can now
> be rejected.

When you create a test case, OpenMetadata now rejects it in the following cases.

* A parameter that offers a fixed list of values (for example, `thresholdUnit` or the `strategy` of a
  custom SQL test) is given a value that is not in that list. The comparison ignores letter case, and a
  blank value counts as not set.
* The test targets a column whose data type the test definition does not support. A definition with no
  listed data types still supports every type.

OpenMetadata 2.0 stored these test cases, and they then failed or measured nothing when the test ran.
The UI, API clients, and the Model Context Protocol (MCP) create tool all use `POST /v1/dataQuality/testCases`.
The check runs on that call.
When you edit an existing test case, only the values you change are checked, so test cases you already have stay editable.

> [!NOTE]
>
> The creation check is not applied to create-or-update calls (`PUT`) or to CSV import in 2.1, so test cases sent
> that way are still stored as before and can still fail when the test runs.

> [!NOTE]
>
> If an automation creates test cases and starts receiving `400` errors after the upgrade, compare the
> parameter values and the column type against the test definition. Test cases created from dbt or Great
> Expectations are not affected because they create their own definitions without these limits.

## Value Handling in the In Set and Not In Set Tests

> [!NOTE]
>
> **Behavioral.** Affects `columnValuesToBeInSet` and `columnValuesToBeNotInSet`.

The following changes apply.

* Values written as a JSON list (for example, `[false, true]`) are now accepted. A JSON list with
  lowercase `true`, `false`, or `null` aborted the test in 2.0.
* On a column of type BOOLEAN, the text values `"true"` and `"false"` (any letter case) are compared as
  real booleans.
* A value that is not a list, such as a bare string or number, now aborts the test with an error. Wrap
  single values in a list.

## Table Column Set Test Honors `ordered: "false"`

> [!NOTE]
>
> **Behavioral.** Affects `tableColumnToMatchSet`.

Setting `ordered` to the text `"false"` was treated as `true` in 2.0, so the test compared column order
anyway. Now `"false"` means order is ignored. Tests that relied on the old behavior and passed only
because the order matched keep passing. Tests that were failing because of the order may now pass.

## Failed Rows Sample Is Kept When a Test Passes Within Its Threshold

> [!NOTE]
>
> **Behavioral.** Affects what you see on a passing test case.

The failed rows sample was stored and shown only when a test result was `Failed` in 2.0. It is
now also kept and shown when a test passes while still finding failed rows, which happens when a failure
threshold tolerates them. Expect failed-row samples on test cases that previously showed none.

## Unsafe Pandas Expressions Fail the Test

> [!NOTE]
>
> **Behavioral.** Affects data quality tests that run on data lake and file sources, where expressions
> are evaluated with pandas.

Expressions you write in a test are now checked before they run. This covers the custom SQL query, the partition expression, rule library expressions, and
the column name in the inserted-row-count test. An expression that calls functions or reads attributes is no longer executed. The test fails instead, and a custom metric
with such an expression is skipped with a warning. Rewrite these expressions as plain comparisons.

## Failure Thresholds and Dimension Roll-Up on Test Definitions

> [!NOTE]
>
> **Additive.** Defaults keep existing tests behaving as before.

The built-in column and table tests gain optional parameters. Examples include not-null, unique, in-set, between, regex, row count, and
column count tests. The following table lists the parameters.

| Parameter | What it does | Default |
| - | - | - |
| `threshold` | Number of failures tolerated before the test fails. | `0` |
| `thresholdUnit` | Read `threshold` as `ABSOLUTE` rows or a `PERCENTAGE` of evaluated rows. | `ABSOLUTE` |
| `dimensionFailurePolicy` | `OVERALL_ONLY` or `ANY_DIMENSION` to fail the test as soon as one dimension fails. | `OVERALL_ONLY` |
| `minRowsPerDimension` | Under `ANY_DIMENSION` with a percentage threshold, groups with fewer rows are reported but cannot fail the test (only on tests that support it). | `0` |

The upgrade adds these parameters to the definitions you already have. The upgrade also makes the following test definition updates.

* `tableDiff` gains `parallelQueries` (default `1`) to run several comparison queries at once.
* The numeric column tests now list `NUMERIC` as a supported data type, so they appear for Snowflake and
  DB2 numeric columns.
* The upgrade restores missing `columnName`, `rangeType`, and `rangeInterval` parameters on
  `tableRowInsertedCountToBeBetween` for deployments that lost them. It also adds the `operator` and
  `partitionExpression` parameters of the custom SQL test where they were missing.

## Test Results, Incidents, and Bulk Actions

> [!NOTE]
>
> **Additive.**

Test results, incidents, and bulk actions gain the following.

* Test case results gain `duration`, `errorDetails`, and a richer `evaluationScope`. The `errorDetails` field holds the type, message, and stack trace of an aborted run.
  The `evaluationScope` field says whether the run used a sample or a partition. Dimension results gain `minBound`, `maxBound`, and `excludedFromRollUp`.
* Incidents gain a `failureSummary` and an incident summary table for faster listing. They also gain a grouping
  endpoint (`/testCaseIncidentStatus/incidentGroups`) that groups open incidents by table, test
  definition, or owner. The upgrade backfills the summary table from existing incident history.
* A new request schema, `BundleSuiteBulkRemoveRequest`, describes removing several test cases from a
  logical test suite in one call.
* Data Insights data-asset charts now exclude test cases from totals, so the data-asset total and its
  entity type breakdown keep reconciling. The upgrade updates the stored chart definitions.

## Profiler and Sampling Settings

> [!NOTE]
>
> **Breaking for stored or scripted configuration.** Removed field: `sampleDataStorageConfig`.

External S3 storage for sample data was removed, and with it the `sampleDataStorageConfig` property from
connection and profiler schemas. Because those schemas reject unknown fields, any configuration that
still contains this key fails validation. The upgrade strips the key from the following stored items.

* Services
* Database and schema profiler settings
* Version history
* Saved test connection requests

If you manage connections or profiler settings as code, remove the key from your files.

In Python code, the module `metadata.profiler.processor.sample_data_handler` is removed. This includes
`upload_sample_data`, `upload_to_storage`, `validate_path_pattern`, and `PathPatternException`. Remove any import
of these names from custom profiler code.

A profiler workflow must also name its database service. A 2.0 profiler configuration without
`source.serviceName` scanned every table available in the data source and looked each one up in OpenMetadata.
That mode is removed, along with `metadata.profiler.source.metadata_ext`. Set `source.serviceName` in
profiler YAML and Python configurations.

The auto-classification `sampleDataCount` now has a maximum of `1000`. The upgrade lowers any saved
pipeline above that to `1000`. Lower the value in your own configuration files so they still validate.


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