# Dataset Quality Statuses (SLA)

Mark the importance of each test on a dataset using **Minor**, **Major**, and **Critical** severities. The platform aggregates those severities together with the test pass / fail counts into a single dataset-level **SLA colour** (Green / Yellow / Red) that downstream BI reports can import directly.

## Setting severities

Severities are operator-set — the platform does not infer them.

1. Open the dataset's main page and select the **Test reports** tab.
2. Click on a job (a test result row) and, in the right-side panel, choose a severity — Minor, Major, or Critical.

Severities apply per-test, not per-dataset; one dataset can carry tests at all three severities. Each test's severity together with whether the latest run passed feeds the dataset's aggregate SLA colour.

## Importing SLA into BI reports

Each dataset exposes its current aggregate SLA at:

```
GET https://{platform_url}/api/datasets/{data_entity_id}/sla
```

`{data_entity_id}` is the numeric ID of the dataset's data entity — the same ID that appears in the dataset's catalog URL.

The endpoint returns a `DataSetSLAReport` that includes:

* The dataset's current **SLA colour** — `GREEN`, `YELLOW`, or `RED`.
* A breakdown of severity weights — counts of tests at each severity.
* A `slaRef` self-link.

BI tools can fetch this endpoint per dataset and render the colour as a one-glance trust signal next to dashboard tiles or report sections.

## How the SLA colour is computed

The SLA colour is **not** a direct severity-to-colour mapping — it is computed across the dataset's tests by `SLACalculator` based on which severities have failing tests:

* **Red** — at least one Critical test is failing, OR all Major-severity tests are failing, OR a particular all-but-one-Major-failing-and-all-Minors-failing pattern.
* **Yellow** — some Major tests failing (but not all), OR all Minor tests failing, OR no tests at any severity defined yet (the platform errs cautious when nothing is defined).
* **Green** — none of the above; passing tests dominate at every severity.

So changing a single test's severity from Major to Critical can flip the dataset from Yellow to Red without any test pass / fail status changing. Use severities to encode "how loud should this dataset's failure be" rather than as a labelling exercise.

## Where to next

* [Test Results Import](/features/data-quality/test-results-import.md) — how the test results that the SLA aggregates land in the catalog.
* [Quality Dashboard](/features/data-quality/dashboard.md) — the catalog-wide quality view that surfaces test outcomes alongside the per-dataset SLA.
* [Alerting](/features/active-platform-features/alerting.md) — DQ-test-failed alerts (which fire on the test-result event the SLA also consumes).
* [Visibility for Data Quality Engineer](/use-cases/use-cases/dq-visibility.md) — the DQ-engineer use case end-to-end.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opendatadiscovery.org/features/data-quality/sla-statuses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
