Create and edit metrics


  • You need the Workspace Editor role to complete the procedures on this page, unless otherwise noted at the top of the procedure. However, if you have the Workspace Viewer role, you can open a metric configuration and run a preview of the metric. Learn about workspace roles.
  • Before you work on a new metric, review your target data asset in the Explorer tree to make sure it is active. If it isn't, you won't be able to select it when you configure the metric. For more help, see Activate data assets.

After you set up a datasource and prepare its data assets, you can create and configure metrics on them to measure data quality. A metric continuously measures some dimension of data quality, aggregating and recording results at a chosen aggregation interval.

Examples of metrics

  • The volume of data being brought into a table
  • The lag of data being loaded into a table
  • The percent of null values in a column
  • The percent of values that have 10 digits in a string column type

Create a metric

You can create your own metrics tailored to your specific data quality concerns.


Start in Explorer to save time

The following procedure begins in Explorer, because if you start from the data asset some metric configuration information is filled in for you. However, you can also create a metric when viewing the Metrics list by selecting Create Metric + just above the list header row.

  1. In the Explorer tree, select the data asset that you want to measure.
  2. On the right, on the Actions menu select + Create Custom Metric, then proceed to Step 1 (Metric Info).

Step 1 (Metric Info)

  1. Under Custom Metric Info, select a metric type.
  2. If desired, change the value of Quality dimension.


OR operators

  • All metric types allow multiple conditions using WHERE, but the second and any subsequent conditions added to a clause use the AND operator (all listed conditions must be met).
  • OR operators can be used in [SQL metrics] if the SELECT statement is nested and the OR is not in the innermost SELECT.


Quality dimensions

Each data quality metric (including autometrics) measures one dimension of data quality: accuracy, completeness, timeliness, or (if none of these applies), custom. These dimensions provide a way to work with similar metrics across datasources, such as on the Dashboard. They also are available for sorting and filtering lists of metrics and monitors.

The rest of the process depends on which metric type you select. For the remaining steps, follow the link that corresponds to the metric's type (links are in the next section).

Types of metrics

To proceed, select the subpage for your metric type:


Before you begin to create a metric to compare aggregate metrics, consider reviewing the source and target data assets and the metrics for both, to ensure that the metrics you plan to compare are comparable and have the same aggregation settings.

  • Conformity metrics measure the validity of data by checking whether values meet one or more conditions that you specify.
  • Data delay metrics measure delay in the arrival of expected data into data assets. Available for use with tables and schemas.
  • Data volume metrics measure deviations from expected data volumes. Available for use with tables and schemas.
  • Distribution metrics measure the distribution of values in a specified column.
  • Null percent metrics measure the percent of a column's values that are null.
  • Row by row metrics let you measure data value differences between a source table and a target table, by picking key fields (to match the rows) and which columns' values you want to compare.
  • SQL metrics measure whatever you model with valid SQL, but must include a SELECT statement that meets basic metric query requirements (details available on the subpage).

Add a failing records query

Some metric types support a failing records query: SQL that you can run to see records associated with an incident. If the metric supports it, you add a failing records query in Step 2 of metric configuration, just above the tags section.

  1. When you are on Step 2 of metric configuration, on the right margin beside Failing records query select Add +.
  1. Enter the SQL for your failing records query in the Custom SQL box.
  1. When you are ready, select Validate Query to make sure your query will run.
    • If the SQL is valid, the button text changes to Successful Validation, as depicted in the next image.
    • If the SQL isn't valid, an error pops up with debug information.

Edit a metric

  1. In the Explorer tree, select the data asset that the metric is based on.
  2. On the right, find the chart for the metric you want to edit. Then, in its top-right corner select the three vertical dots, and then select Edit.
  1. The metric configuration opens and displays the first tab,Step 1 (Metric Info). Select the step you want to edit by (1) choosing a different tab, or (2) selecting the corresponding pencil icon in the left nav.
  1. Make any changes in the main page (such as setting up seasonality or adjusting slices). Then select the Step 3 tab.
  2. If desired, preview the metric. Select Save at the top right corner when you're done.


Cancel a preview

Some datasources let you cancel a preview, for example because you noticed that date range was wrong. If cancelling is supported, you'll see a Cancel button.

Set up seasonality

Many data assets have regular behavior patterns. For example, a restaurant might have three rushes (breakfast, lunch, and dinner) that occur daily at all locations, each about an hour long. Data from one of the off-hours isn't really comparable to data from one of the rushes. Likewise, breakfast data might not normally look like dinner data. To account for these patterns, you need a way to make sure you compare the right data periods. In Lightup, this regular variation is called seasonality.

When a metric runs, if seasonality is set up it will create separate profiles for each season. So in our example restaurant, every hour of the day is a season, and the metric creates profiles for each of them. Then when you add an anomaly detection monitor, it only compares seasons to each other— comparing lunch hours to lunch hours, etc.

You set up seasonality for a metric at Step 2 (Configure Metric), which has different configuration options for each metric type. But seasonality works the same in all of them:

  1. Open the metric configuration and select the Step 2 tab. Seasonality appears just below the inheritable settings in the right pane. For new metrics, it is set to No Seasonality.
  2. Select the current Seasonality setting and choose a different seasonality. For help understanding the options, see the following section.

What the Seasonality options mean

Except for No Seasonality and Auto Seasonality, each setting for Seasonality has two parts:

  • The period of time over which all seasons occur— in our example restaurant, the seasons occur daily.
  • The length of seasons— the individual chunks of time that have typical behavior. For our example, the seasons are one hour long.

So for our example restaurant, we'd set Seasonality to Daily with 1 hour seasons. The following table shows how many seasons occur how often for each option in the drop-down Seasonality menu.

SeasonalityNumber of seasonsOccurring every
Daily with 15 minute seasons96Day
Daily with 1 hour seasons24Day
Daily with 8 hour seasons3Day
Weekly with 15 minute seasons672Week
Weekly with 1 hour seasons168Week
Weekly with 8 hour seasons21Week
Weekly with 1 day seasons7Week

The Metrics list

With a workspace selected, select Metrics on the top bar to open the Metrics list: an easy way to work with all the metrics in the workspace.

  • Assess metrics at a glance— tiles across the top display counts of metrics in the workspace:
    • Total (all metrics)
    • Monitored (metrics with at least one monitor attached)
    • Ongoing incidents (metrics currently generating an incident)
    • Live (metrics currently active)
    • Paused (metrics currently paused for any reason)
    • Error (metrics stopped by an exception, or after three query timeouts due to query governance settings)
  • Just above the list items, controls let you work with the list:
    • Search for a metric.
    • Create Metric + opens a new metric at Step 1 (Metric Info).
    • Show x sets how many rows to display per page (in general, fewer is faster).
    • Select the gear icon to choose what columns to display.
    • Navigation arrows and page numbers let you jump around in the list.
  • In the list header, you have more options for working with list items:
    • Select the check box to select all items on the page.
    • Select a column heading to sort the list using the column's values in ascending order. Select it again to reverse the sort order. Select it a third time to stop sorting.
  • In the Name column, select a value to open the context menu:


Activity autometrics don't appear in the Metrics list because they can't be cloned, deleted, edited, or manually paused/resumed. You can work with Activity autometrics in the Explorer tree, and you can enable and disable them by using the relevant Manage Metrics modal.