Skip to main content
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 event. Validio stores each reported value on the catalog asset the event names, and the validator checks every new value against a threshold. 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.

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.
  • A producer that sends events to the Validio OpenLineage endpoint. For the endpoint, authentication, and the event fields Validio requires, see OpenLineage.

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. 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, 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: For the full list of warehouse schemes and naming rules, see 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
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.

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: 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, 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

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

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, 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 on the source, then start the 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

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

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. An imported metrics source accepts only Imported Metric validators and one record window, and validator recommendations 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.
  6. Configure the threshold. 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 and critical fields.
  8. Click Continue to create the validator.
  9. If the source is not running, start it. See 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

How the validator evaluates metrics

  • Each reported value is its own window. The validator runs on a record window 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 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: 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.

Rerunning

You can rerun 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 of a glossary term, and the data quality of a field by dimension. For more information, see Data Quality Dimensions.

Use the Validio MCP server

AI assistants connected to the Validio MCP Server 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.