quality_monitors
Operations on a quality_monitors
resource.
Overview
Name | quality_monitors |
Type | Resource |
Id | databricks_workspace.unitycatalog.quality_monitors |
Fields
Name | Datatype |
---|---|
assets_dir | string |
baseline_table_name | string |
custom_metrics | array |
dashboard_id | string |
drift_metrics_table_name | string |
inference_log | object |
latest_monitor_failure_msg | string |
monitor_version | string |
notifications | object |
output_schema_name | string |
profile_metrics_table_name | string |
schedule | object |
slicing_exprs | array |
snapshot | object |
status | string |
table_name | string |
time_series | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | table_name, deployment_name | Gets a monitor for the specified table. |
create | INSERT | table_name, deployment_name | Creates a new monitor for the specified table. |
delete | DELETE | table_name, deployment_name | Deletes a monitor for the specified table. |
update | UPDATE | table_name, deployment_name | Updates a monitor for the specified table. |
SELECT
examples
SELECT
assets_dir,
baseline_table_name,
custom_metrics,
dashboard_id,
drift_metrics_table_name,
inference_log,
latest_monitor_failure_msg,
monitor_version,
notifications,
output_schema_name,
profile_metrics_table_name,
schedule,
slicing_exprs,
snapshot,
status,
table_name,
time_series
FROM databricks_workspace.unitycatalog.quality_monitors
WHERE table_name = '{{ table_name }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new quality_monitors
resource.
- quality_monitors
- Manifest
/*+ create */
INSERT INTO databricks_workspace.unitycatalog.quality_monitors (
table_name,
deployment_name,
data__skip_builtin_dashboard,
data__warehouse_id,
data__assets_dir,
data__output_schema_name,
data__inference_log,
data__time_series,
data__snapshot,
data__slicing_exprs,
data__custom_metrics,
data__baseline_table_name,
data__schedule,
data__notifications
)
SELECT
'{{ table_name }}',
'{{ deployment_name }}',
'{{ skip_builtin_dashboard }}',
'{{ warehouse_id }}',
'{{ assets_dir }}',
'{{ output_schema_name }}',
'{{ inference_log }}',
'{{ time_series }}',
'{{ snapshot }}',
'{{ slicing_exprs }}',
'{{ custom_metrics }}',
'{{ baseline_table_name }}',
'{{ schedule }}',
'{{ notifications }}'
;
- name: your_resource_model_name
props:
- name: skip_builtin_dashboard
value: true
- name: warehouse_id
value: string
- name: assets_dir
value: string
- name: output_schema_name
value: string
- name: inference_log
value:
problem_type: PROBLEM_TYPE_CLASSIFICATION
timestamp_col: string
granularities:
- string
prediction_col: string
label_col: string
model_id_col: string
prediction_proba_col: string
- name: time_series
value:
timestamp_col: string
granularities:
- string
- name: snapshot
value: {}
- name: slicing_exprs
value:
- string
- name: custom_metrics
value:
- name: string
definition: string
input_columns:
- string
output_data_type: string
type: CUSTOM_METRIC_TYPE_AGGREGATE
- name: baseline_table_name
value: string
- name: schedule
value:
quartz_cron_expression: string
timezone_id: string
pause_status: UNPAUSED
- name: notifications
value:
on_failure:
email_addresses:
- string
UPDATE
example
Updates a quality_monitors
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.unitycatalog.quality_monitors
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE table_name = '{{ table_name }}' AND
deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a quality_monitors
resource.
/*+ delete */
DELETE FROM databricks_workspace.unitycatalog.quality_monitors
WHERE table_name = '{{ table_name }}' AND
deployment_name = '{{ deployment_name }}';