PUT /v1/tables/{id}/customMetric
Custom Metrics
Add and delete custom metrics for tables
PUT
PUT /v1/tables/{id}/customMetric
Documentation Index
Fetch the complete documentation index at: https://openmetadata-codex-audit-docs-codebase-alignment.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Custom Metrics
Define custom SQL-based metrics on a table or specific column. Custom metrics are evaluated during profiling runs and tracked over time.Add Custom Metric
PUT /v1/tables/{id}/customMetric
UUID of the table.
Name of the custom metric. Must be unique within the table.
SQL expression to evaluate for this metric. Must return a single numeric value.
Name of the column this metric applies to. If omitted, the metric is table-level.
Description of what this metric measures.
Delete Custom Metric
DELETE /v1/tables/{id}/customMetric/{metricName}
UUID of the table.
Name of the custom metric to delete.
PUT /v1/tables/{id}/customMetric
Returns
Add returns the updated table object with the custom metric included. Delete returns no content (204).Response
Array of custom metrics defined on the table.
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission |
404 | NOT_FOUND | Table or custom metric does not exist |
400 | BAD_REQUEST | Invalid metric definition or SQL expression |
409 | CONFLICT | Custom metric with same name already exists |