Data quality monitors (Lakehouse Monitoring)
manage_uc_monitorsCreate, update, refresh, and delete Unity Catalog data quality monitors, then inspect profile and drift metrics to track table or schema health.
Instructions
Manage Unity Catalog data quality monitors (Lakehouse Monitoring) via the Data Quality API.
Actions (full_name identifies the table, or schema with object_type=schema):
create(spec): table monitors take DataProfilingConfig fields - output_schema_name (catalog.schema, or output_schema_id), exactly one of snapshot {} | time_series {timestamp_column, granularities: ["AGGREGATION_GRANULARITY_1_DAY", ...]} | inference_log {...}, plus optional schedule {quartz_cron_expression, timezone_id}, slicing_exprs, custom_metrics, baseline_table_name, assets_dir, warehouse_id, notification_settings, skip_builtin_dashboard. Schema monitors take AnomalyDetectionConfig fields (excluded_table_full_names).
get, update(spec: only the fields to change), delete (metric tables/dashboard are kept).
refresh (starts compute), list_refreshes, get_refresh(refresh_id), cancel_refresh(refresh_id).
metrics: profile_metrics_table_name, drift_metrics_table_name, dashboard_id - query them with SQL.
query_metrics(metrics_table=profile|drift, sample_rows, warehouse_id?): sample rows of a metric table. Listing all monitors is not available (the SDK marks list_monitor as unimplemented).
Safety classification: create, update, cancel_refresh = WRITE; get, list_refreshes, get_refresh, metrics = READ_ONLY; delete = DESTRUCTIVE+WRITE; refresh = EXECUTION; query_metrics = EXECUTION+READ_ONLY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Request body fields for create/update, using the Databricks REST API field names (snake_case). Unknown fields are rejected. | |
| action | Yes | create/get/update/delete a monitor; refresh: start a metrics refresh; list_refreshes/get_refresh/cancel_refresh; metrics: names of the profile/drift metric tables and dashboard; query_metrics: sample rows from a metric table via a SQL warehouse. | |
| confirm | No | Set to true ONLY after the user has reviewed the plan returned by a previous call with status 'confirmation_required'. Required for destructive/security-sensitive actions. | |
| dry_run | No | If true, validate and return the planned change without executing it. | |
| full_name | No | Monitored object: table catalog.schema.table (or catalog.schema when object_type=schema). | |
| page_size | No | Max items to return (server caps this). | |
| page_token | No | next_page_token from a previous response. | |
| refresh_id | No | Refresh id for get_refresh / cancel_refresh. | |
| object_type | No | table: data profiling monitor; schema: anomaly detection monitor. | table |
| sample_rows | No | query_metrics: rows to return. | |
| warehouse_id | No | SQL warehouse for query_metrics. | |
| metrics_table | No | query_metrics: which metric table to sample. | profile |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| page | No | ||
| plan | No | ||
| tool | Yes | ||
| action | No | ||
| safety | No | ||
| status | No | success | |
| summary | Yes | ||
| warnings | No | ||
| next_steps | No | Suggested follow-up calls. | |
| request_id | No |