Skip to main content

Custom Metrics

Custom metrics let you define SQL-based metrics that the profiler computes alongside built-in system metrics. Add them at the table level to track aggregate values across rows, or at the column level to measure values for a specific column. Computed results appear in the Table Profile and Column Profile tabs after the Profiler Agent runs.

Table-Level Metrics

Table-level metrics track a custom aggregate value computed across all rows in a table.
  1. In the table’s details page, navigate to the Data Observability tab and click Table Profile.
  2. Click Add and select Custom Metric. Select Add Custom Metric
  3. In the Add Table metric drawer on the right side of the page, fill in the following required fields and click Create.
    • Name: A unique descriptive name for this metric.
    • SQL Query: A SQL expression that returns a single numeric value. The result appears as a custom metric under Data Volume on the Table Profile tab. The SQL field is a code editor.
    The new metric’s graph appears without a page reload. Input SQL query
  4. After the custom metric is added, navigate to the database service and run the Profiler Agent from the Agents tab. Run Profiler Agent
  5. After the run is completed, return to the table to view the computed custom metric on the Table Profile tab. View Custom Metric

Column-Level Metrics

Column-level metrics track a custom value computed for a specific column in a table.
  1. In the table’s details page, navigate to the Data Observability tab and click Column Profile.
  2. Click Add and select Custom Metric. Select Add Custom Metric
  3. In the Add Column metric drawer on the right side of the page, fill in the following required fields and click Create.
    • Name: A unique descriptive name for this metric.
    • Column: The column this metric applies to. The active column is preselected. Select a different column from the dropdown list if needed.
    • SQL Query: A SQL expression that returns a single numeric value for the selected column. The result appears as a custom metric under Data Counts on the Column Profile tab.
    The new metric’s graph appears without a page reload, and you land on that column’s profile. Input SQL query
  4. After the custom metric is added, navigate to the database service and run the Profiler Agent from the Agents tab. Run Profiler Agent
  5. After the run is completed, return to the table to view the computed custom metric on the Column Profile tab. View Custom Metric

Custom Metric Drawer

The same drawer is used to add and edit custom metrics. It shows a profile preview beside the form: the table profile charts for a table metric, or the profile of the selected column for a column metric.
  • Show Hint: A toggle in the drawer header, on by default. Turn it off to hide the profile preview panel. The form then takes the full width of a narrower drawer.

Edit a Custom Metric

Use the following steps to edit an existing custom metric.
  1. In the Table Profile or Column Profile tab, find the custom metric’s graph.
  2. Open the menu on the graph and select Edit. The drawer opens with the title Edit <name>.
  3. Update the SQL query and click Save. The Name and Column fields are locked and can’t be changed.