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

# Imported Metric

> An Imported Metric validator monitors a data quality metric that another tool computes and reports to Validio through OpenLineage, such as a row count or a column's null count.

An Imported Metric validator monitors a data quality metric that another tool computes and reports to Validio, such as the row count of a table or the null count of a column. The tool sends the metric in an [OpenLineage](https://docs.validio.io/docs/integrations/openlineage.md) event. Validio stores each reported value on the catalog asset the event names, and the validator checks every new value against a [threshold](https://docs.validio.io/docs/thresholds.md).

Use an Imported Metric validator when the data is checked somewhere Validio does not query, for example a data quality step in a pipeline, a file in object storage, or a system without a native Validio integration. You can also use it on a warehouse table, to monitor a metric a pipeline already calculates without running another query on the warehouse.

For an overview of all validator types, see [Validator Types](https://docs.validio.io/docs/validators/validator-types.md).

## How imported metrics work

1. A tool sends an OpenLineage `COMPLETE` event. A dataset in the event carries a `dataQualityMetrics` facet with the values the tool calculated.
2. Validio maps the dataset to a catalog asset and stores each value on that asset, dated by the event's `eventTime`.
3. You set up an imported metrics source on the asset. This source reads the reported metrics, not the asset's data.
4. You create an Imported Metric validator on that source for one reported metric, and start the source.
5. Each time a new value arrives, the validator evaluates it against the threshold and opens an incident when it is out of bounds.

Imported Metric validators run only on imported metrics sources, and an imported metrics source takes no other validator type. A warehouse table can have a data source and an imported metrics source at the same time.

## Report metrics with OpenLineage

### Prerequisites

* An API key with `catalogAssets:WRITE` permission. See [Managing API Keys](https://docs.validio.io/docs/access-and-settings/settings/managing-api-keys.md).
* A producer that sends events to the Validio OpenLineage endpoint. For the endpoint, authentication, and the event fields Validio requires, see [OpenLineage](https://docs.validio.io/docs/integrations/openlineage.md#configure-your-openlineage-producer).

### Add the metrics to the event

Put the metrics in a `dataQualityMetrics` facet on a dataset in the event's `inputs` or `outputs`. The OpenLineage specification defines this facet as an input dataset facet, in `inputFacets`. Validio also accepts it in the dataset's `facets`.

Validio reads one `dataQualityMetrics` facet per dataset. It looks in `inputFacets` first, then in `facets`. If a dataset carries the facet in both places, the one in `facets` is ignored without an error. A facet in `outputFacets` is not read.

| Location in the facet | Becomes | Example |
| :- | :- | :- |
| A numeric key at the top level | An asset-level metric, on the whole asset | `"rowCount": 10000` becomes `rowCount` |
| `columnMetrics.<column>` | A column metric, on that field of the asset | `"columnMetrics": { "amount": { "nullCount": 0 } }` becomes `nullCount` on `amount` |
| An object of numbers, one level deep | One metric per key, joined with a dot | `"quantiles": { "0.5": 39.99 }` becomes `quantiles.0.5` |

Validio keeps the metric names exactly as the tool sends them, so `rowCount` and `row_count` are two different metrics. Any metric name is accepted, not only the ones in the OpenLineage specification. Values that are not numbers, such as strings, booleans, and arrays, are ignored. Inside a nested object, only numbers are read: an object nested two levels deep, such as `"histogram": { "buckets": { "10": 5 } }`, stores nothing.

Validio stores the metrics when it receives the run's `COMPLETE` event, and dates every value by that event's `eventTime`. This time is the value's observed time. A run that ends with `FAIL` or `ABORT` stores no metrics. Sending the same event again, with the same `run.runId` and `eventTime`, does not add a second value. Two different runs that report the same metric with the same `eventTime` both store a value. If both values are stored before the validator reads that time, it evaluates the larger one. A value that arrives after the validator read that time is skipped, like any [late value](#how-the-validator-evaluates-metrics), until you rerun the validator. For example, if a run reports a `nullCount` of 3, the validator evaluates it, and a later run reports 12 for the same `eventTime`, the validator shows 3 until a rerun evaluates 12.

### Which asset receives the metrics

The dataset's `namespace` decides whether the metrics land on an existing warehouse table or on a generic asset:

| Dataset namespace | Where the metrics land |
| :- | :- |
| A supported warehouse scheme, such as `postgres://`, `snowflake://`, or `bigquery` | The catalog asset for that table, matched by the `database.schema.table` name. The host in the namespace is not part of the match. |
| Any other scheme, such as `custom://quality-checks` or `s3://my-bucket` | A generic catalog asset. Validio creates it on the first event. For example, namespace `custom://quality-checks` with name `orders_daily` creates the asset `custom://orders_daily`. |

For the full list of warehouse schemes and naming rules, see [How datasets map to catalog assets](https://docs.validio.io/docs/integrations/openlineage.md#how-datasets-map-to-catalog-assets).

### Column metrics

Validio stores a column metric only when the asset has a field with exactly that column name, including case. A metric for any other column is dropped without an error.

* **Generic asset:** add a `schema` facet to the dataset that lists the columns, as in the example below. The facet creates the fields, so the column metrics have a field to land on.
* **Warehouse table:** the fields already come from the catalog. Use the column names exactly as they appear in Catalog. A `schema` facet whose case differs, such as `customer_id` for a Snowflake column `CUSTOMER_ID`, adds a second field to the asset instead of matching the existing one, and the metric is stored on that new field.

### Example event

The following event reports a row count for the whole asset and a null count for the `customer_id` column. Because `custom://` is not a warehouse scheme, the metrics land on the generic asset `custom://orders_daily`.

```json title="JSON" theme={null}
{
  "eventType": "COMPLETE",
  "eventTime": "2026-10-30T06:00:00Z",
  "run": { "runId": "8c5e2f1a-3b7d-4e9a-a1c2-6f0d9e8b7a54" },
  "job": { "namespace": "quality-checks", "name": "check_orders_daily" },
  "producer": "https://example.com/my-producer",
  "schemaURL": "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/RunEvent",
  "inputs": [
    {
      "namespace": "custom://quality-checks",
      "name": "orders_daily",
      "facets": {
        "schema": {
          "_producer": "https://example.com/my-producer",
          "_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json",
          "fields": [
            { "name": "customer_id", "type": "STRING" }
          ]
        }
      },
      "inputFacets": {
        "dataQualityMetrics": {
          "_producer": "https://example.com/my-producer",
          "_schemaURL": "https://openlineage.io/spec/facets/1-0-1/DataQualityMetricsInputDatasetFacet.json",
          "rowCount": 10000,
          "columnMetrics": {
            "customer_id": { "nullCount": 12 }
          }
        }
      }
    }
  ],
  "outputs": []
}
```

To report the same metrics for a Snowflake table instead, set the namespace to `snowflake://<account>` and the name to `DATABASE.SCHEMA.TABLE`. Leave out the `schema` facet, and write the column names in `columnMetrics` as Catalog shows them, for example `CUSTOMER_ID`. The metrics then land on that table's catalog asset. See [Column metrics](#column-metrics).

## Confirm the metrics arrived

The OpenLineage endpoint returns `200` even when an event stores no metrics. To check what Validio stored, open the asset in **Catalog > Assets**. For a generic asset, the asset itself appears after the first event, with the name from the event, such as `custom://orders_daily`.

Once metrics are reported for an asset, its details page shows an **Imported metrics** tab. The tab lists one row per metric and field, with these columns:

| Column | Description |
| :- | :- |
| Metric | The metric name, as the reporting tool sent it. |
| Field | The field the metric describes. A dash for an asset-level metric, such as `rowCount`. |
| Latest value | The most recent value reported for the metric. |
| Observed | The observed time of the latest value, from the event's `eventTime`. |
| Latest report | When Validio last received a value for the metric. |

A value can be observed long before it is reported, for example when a tool reports an old run. The metrics of one field also appear in the **Imported metrics** section of the [schema field sidebar](https://docs.validio.io/docs/schema-and-profiling.md#schema-field-sidebar), on the asset's **Schema & Profiling** tab and on the lineage graph.

![The Imported metrics tab of a catalog asset, listing each reported metric with its field, latest value, observed time, and latest report time](https://mintcdn.com/validio/tGA9-d7qpa-9YqsV/images/docs/validators/1140-imported-metrics-tab.png?fit=max\&auto=format\&n=tGA9-d7qpa-9YqsV\&q=85\&s=fddd14edd936edc1e62900aebec870b0)

The Imported metrics tab of a catalog asset

## Set up an imported metrics source

An imported metrics source monitors the metrics reported for one catalog asset. You can set one up on any asset that has reported metrics, a warehouse table or a generic asset. Validio does not query the asset through this source, so it has no polling schedule and needs no warehouse credential.

![The Sources tab of a catalog asset, with the data quality graph, one source on the asset, and the New source menu button](https://mintcdn.com/validio/tGA9-d7qpa-9YqsV/images/docs/validators/1140-catalog-asset-sources-tab.png?fit=max\&auto=format\&n=tGA9-d7qpa-9YqsV\&q=85\&s=016501f347ac2677b275c3dbfa10d101)

The Sources tab of a catalog asset

To set up an imported metrics source,

1. Open the asset's details page and click the **Sources** tab.
2. Start the setup:
   * If no source on the asset is visible to you, click **New imported metrics source**.
   * Otherwise, click **New source**. When the asset can also take a data source, a menu opens. Select **Imported metrics source**.
3. Under **Namespace**, select the namespace for the source. Its validators belong to the same namespace. The **What this sets up** card lists what the setup creates in that namespace:
   * **Credential:** a new imported metrics credential, named `Imported metrics`, when the namespace has none. Otherwise the card says **Uses** and names the namespace's existing imported metrics credential.
   * **Source:** the imported metrics source. It is created stopped. Start it after you add a validator.
   * **Segmentation:** an unsegmented segmentation, so each metric is one series.
   * **Window:** a record window on `validio_observed_at`, so each reported value is checked on its own.
4. Click **Continue**.
5. Under **Source details**, keep the name, which Validio fills in from the asset, or enter another. Optionally add a description and tags. Click **Continue** to create the source with its window and segmentation. In a namespace with [approval workflows](https://docs.validio.io/docs/access-and-settings/approval-workflows.md#proposing-a-change), choose **Create as draft** or **Create and submit** instead. The window and segmentation are drafted with the source and go for review with it. The credential has no draft, so it is created directly.
6. [Create an Imported Metric validator](#create-an-imported-metric-validator) on the source, then [start the source](https://docs.validio.io/docs/sources/managing-sources.md#starting-a-source). A source with no validators cannot start, so a new imported metrics source does not start by itself.

![The Namespace step of Monitor imported metrics, with the namespace select and the What this sets up card listing a new imported metrics credential, the imported metrics source, an unsegmented segmentation, and a record window on validio\_observed\_at](https://mintcdn.com/validio/tGA9-d7qpa-9YqsV/images/docs/validators/1140-imported-metrics-source-namespace.png?fit=max\&auto=format\&n=tGA9-d7qpa-9YqsV\&q=85\&s=a09539e3c42f6353318cbb0f6e1360a5)

The Namespace step of Monitor imported metrics

![The Source details step of Monitor imported metrics, with the Namespace step completed, the name prefilled with the asset name, an empty description, the Add tags section, and the Continue button](https://mintcdn.com/validio/tGA9-d7qpa-9YqsV/images/docs/validators/1140-imported-metrics-source-config.png?fit=max\&auto=format\&n=tGA9-d7qpa-9YqsV\&q=85\&s=95cabd5b7f65501967b3577232e877fa)

The Source details step of Monitor imported metrics

You can also start the same setup from:

* **New imported metrics source** in the actions menu on the asset's row in **Catalog > Assets**.
* **New source** in the sidebar that opens when you click an asset row, in the lineage graph's info panel, or in the selection bar when one asset is selected. It works like **New source** on the **Sources** tab.

Setting up an imported metrics source requires `sources:WRITE`, `windows:WRITE`, and `segmentations:WRITE` permission in the namespace. The namespace list shows only the namespaces where you have all three. If the namespace has no imported metrics credential yet, the setup also requires `credentials:WRITE`. Otherwise the namespace step asks you to pick another namespace. See [Managing Roles](https://docs.validio.io/docs/access-and-settings/settings/managing-roles.md).

An imported metrics source accepts only Imported Metric validators and one [record window](https://docs.validio.io/docs/windows/configuring-record-windows.md), and [validator recommendations](https://docs.validio.io/docs/ai-features/validator-recommendations.md) are not available on it. Its **Windows**, **Segmentations**, and **Filters** tabs are hidden, because the source comes with its window and segmentation. Imported Metric validators take no filter.

## Create an Imported Metric validator

1. Open the imported metrics source's details page and click the **Validators** tab.
2. Click **+ New validator**. The wizard opens on the metric step, because **Imported metric** is the only validator type on the source. The type step shows as complete, and you cannot change it.
3. Select the **Metric** to monitor. The list shows every metric reported for the source's asset.
4. Select the **Field** the metric describes. For an asset-level metric, such as `rowCount`, select **Whole asset**.
5. Choose whether to keep **Initialize using historic data** checked. On a source that has already been started, it decides whether the validator also evaluates the values reported before it was created. See [Values reported before the validator exists](#values-reported-before-the-validator-exists).
6. Configure the [threshold](https://docs.validio.io/docs/thresholds.md). Fixed and dynamic thresholds both work.
7. On the **Details** step, enter a name, or keep the generated one, such as `nullCount customer_id`. Review the [data quality dimension](https://docs.validio.io/docs/validators/data-quality-dimensions.md) and critical fields.
8. Click **Continue** to create the validator.
9. If the source is not running, start it. See [Starting a source](https://docs.validio.io/docs/sources/managing-sources.md#starting-a-source).

If no metrics are reported for the source's asset yet, the wizard stays on the type step, and the **Imported metric** type is disabled with the message "No metrics are reported for this source yet."

The wizard does not ask for a window, a filter, or a segmentation. It uses the source's unsegmented segmentation and its record window on the `validio_observed_at` field. If that window is missing, the wizard creates it again, named `Record (validio_observed_at)`.

## Metric configuration parameters

| Parameter | Description |
| :- | :- |
| Metric | A metric reported for the source's asset, named as the reporting tool named it, for example `nullCount`. |
| Field | The field the metric describes. **Whole asset** for a metric on the asset as a whole, such as `rowCount`. |

## How the validator evaluates metrics

* **Each reported value is its own window.** The validator runs on a [record window](https://docs.validio.io/docs/windows/configuring-record-windows.md) dated by `validio_observed_at`, the observed time of each value. Each observed time becomes one datapoint on the validator's graph, and the graph tooltip shows its **Observed** time.
* **New values are evaluated as they arrive.** Once the source is running, the validator does not follow a polling schedule. It evaluates each value shortly after Validio stores it.
* **Late values need a rerun.** After its first read, the validator reads only values newer than the last one it evaluated. A value that arrives late, with an `eventTime` at or before that point, is skipped. To include it, [rerun the validator](https://docs.validio.io/docs/validators/managing-validators.md#rerunning-a-validator) from a datapoint before the late value.
* **Filters and segmentation are not supported.** The validator always runs unsegmented on the whole reported metric.

Validio keeps each reported value for six months after its observed time, then removes it.

### Values reported before the validator exists

Whether a new validator evaluates the values already stored for its metric depends on whether the source has been started, and on **Initialize using historic data**:

| Source | Box | What the validator evaluates |
| :- | :- | :- |
| Never started | Either | Every stored value, oldest first. The box has no effect. When you start the source, it reads right away, and every validator on it starts from the oldest stored value. |
| Started before | Checked | Nothing until the source is backfilled. The backfill evaluates every stored value up to the last one the source has processed. After that, the validator follows new values. |
| Started before | Unchecked | Only values newer than the last one the source has processed. Values reported earlier are not evaluated. |

To backfill when you create the validator, click **Create and backfill** on the **Details** step. The button shows when the box is checked, and it is disabled until the source is running. Otherwise, click **Backfill now** on the source's **Validators pending backfill** banner later. See [Backfilling validators](https://docs.validio.io/docs/sources/managing-sources.md#backfilling-validators).

### Rerunning

You can [rerun](https://docs.validio.io/docs/validators/managing-validators.md#rerunning-a-validator) an Imported Metric validator from its **⋮** menu, or from a datapoint on its graph. A rerun evaluates every stored value again, from the chosen datapoint up to the last value the source has processed. This includes values that arrived late.

## Data quality dimension and critical fields

An Imported Metric validator defaults to the **Validity** dimension, and its critical field defaults to the field you selected. A validator on **Whole asset** has no default critical field. You can change both on the **Details** step, as for any other validator.

Like other validators, Imported Metric validators count toward data quality rollups: the [data quality tab](https://docs.validio.io/docs/catalog/business-glossary.md#data-quality-tab) of a glossary term, and the data quality of a field by dimension. For more information, see [Data Quality Dimensions](https://docs.validio.io/docs/validators/data-quality-dimensions.md).

## Use the Validio MCP server

AI assistants connected to the [Validio MCP Server](https://docs.validio.io/docs/integrations/validio-mcp-server.md) can set up monitoring for imported metrics:

* `convert-catalog-asset-to-source` with `kind` set to `importedMetrics` creates an imported metrics source on an asset, with its record window and unsegmented segmentation. It takes the namespace, and reuses or creates that namespace's imported metrics credential. The source is left stopped.
* `list-imported-metrics` lists the metrics reported for a source's asset, grouped by field.
* `create-validator` creates the Imported Metric validator from a metric and field that `list-imported-metrics` returned. The source already has its window, so no `create-window` call is needed.
* `manage-source` with the `start` action starts the source once it has a validator.

The `recommend-validators` tool does not work on an imported metrics source. Ask the assistant to list the source's imported metrics instead. For example prompts, see [MCP Server User Guide](https://docs.validio.io/docs/integrations/validio-mcp-server/mcp-server-user-guide.md#monitoring-metrics-reported-by-other-tools).

## Related resources

* [OpenLineage](https://docs.validio.io/docs/integrations/openlineage.md)
* [Configuring Record Windows](https://docs.validio.io/docs/windows/configuring-record-windows.md)
* [Catalog Assets](https://docs.validio.io/docs/catalog/catalog-assets.md)
* [Thresholds](https://docs.validio.io/docs/thresholds.md)
* [Validator Types](https://docs.validio.io/docs/validators/validator-types.md)
