QualityMonitor
laktory.models.resources.databricks.QualityMonitor
¤
Bases: BaseModel, PulumiResource, TerraformResource
Databricks Quality Monitor
Examples:
import laktory as lk
qm = lk.models.resources.databricks.QualityMonitor(
assets_dir="/.laktory/qualitymonitors",
output_schema_name="dev.monitoring",
table_name="dev.slv_stock_prices",
snapshot={},
)
| PARAMETER | DESCRIPTION |
|---|---|
assets_dir
|
The directory to store the monitoring assets (Eg. Dashboard and Metric Tables)
TYPE:
|
baseline_table_name
|
Name of the baseline table from which drift metrics are computed from.Columns in the monitored table should also be present in the baseline table.
TYPE:
|
custom_metrics
|
Custom metrics to compute on the monitored table. These can be aggregate metrics, derived metrics (from already computed aggregate metrics), or drift metrics (comparing metrics across time windows).
TYPE:
|
data_classification_config
|
The data classification config for the monitor
TYPE:
|
inference_log
|
Configuration for the inference log monitor
TYPE:
|
latest_monitor_failure_msg
|
TYPE:
|
monitor_id
|
ID of this monitor is the same as the full table name of the format {catalog}.{schema_name}.{table_name}
TYPE:
|
notifications
|
The notification settings for the monitor.
TYPE:
|
output_schema_name_
|
Schema where output metric tables are created. Its of the format {catalog}.{schema}.
TYPE:
|
schedule
|
The schedule for automatically updating and refreshing metric tables.
TYPE:
|
skip_builtin_dashboard
|
Whether to skip creating a default dashboard summarizing data quality metrics. (Can't be updated after creation).
TYPE:
|
slicing_exprs
|
List of column expressions to slice data with for targeted analysis. The data is grouped by each expression independently, resulting in a separate slice for each predicate and its complements. For high-cardinality columns, only the top 100 unique values by frequency will generate slices.
TYPE:
|
snapshot
|
Configuration for monitoring snapshot tables.
TYPE:
|
table_name_
|
The full name of the table to attach the monitor too. Its of the format {catalog}.{schema}.{tableName}
TYPE:
|
time_series
|
Configuration for monitoring timeseries tables.
TYPE:
|
warehouse_id
|
Optional argument to specify the warehouse for dashboard creation. If not specified, the first running warehouse will be used. (Can't be updated after creation)
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
additional_core_resources |
TYPE:
|
table_name |
Remove backticks from table name as they are not accepted by the API
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorCustomMetric
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
definition
|
Create metric definition
TYPE:
|
input_columns
|
Columns on the monitored table to apply the custom metrics to.
TYPE:
|
name
|
Name of the custom metric.
TYPE:
|
output_data_type
|
The output type of the custom metric.
TYPE:
|
type
|
The type of the custom metric.
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorDataClassificationConfig
¤
laktory.models.resources.databricks.qualitymonitor.QualityMonitorInferenceLog
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
granularities
|
List of granularities to use when aggregating data into time windows based on their timestamp.
TYPE:
|
label_col
|
Column of the model label
TYPE:
|
model_id_col
|
Column of the model id or version
TYPE:
|
prediction_col
|
Column of the model prediction
TYPE:
|
prediction_proba_col
|
Column of the model prediction probabilities
TYPE:
|
problem_type
|
Problem type the model aims to solve. Either PROBLEM_TYPE_CLASSIFICATION or PROBLEM_TYPE_REGRESSION
TYPE:
|
timestamp_col
|
Column of the timestamp of predictions
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorNotifications
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
on_failure
|
Who to send notifications to on monitor failure.
TYPE:
|
on_new_classification_tag_detected
|
Who to send notifications to when new data classification tags are detected.
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorNotificationsOnFailure
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
email_addresses
|
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorNotificationsOnNewClassificationTagDetected
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
email_addresses
|
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorSDKClient(quality_monitor_resource, workspace_client)
¤
| METHOD | DESCRIPTION |
|---|---|
create |
Bypass ws.quality_monitors.create to avoid having instantiating the data |
update |
Bypass ws.quality_monitors.update to avoid having instantiating the data |
Source code in laktory/models/resources/databricks/qualitymonitor.py
52 53 54 55 56 | |
create()
¤
Bypass ws.quality_monitors.create to avoid having instantiating the data classes.
Source code in laktory/models/resources/databricks/qualitymonitor.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
update(_qm)
¤
Bypass ws.quality_monitors.update to avoid having instantiating the data classes.
Source code in laktory/models/resources/databricks/qualitymonitor.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
laktory.models.resources.databricks.qualitymonitor.QualityMonitorSchedule
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
quartz_cron_expression
|
string expression that determines when to run the monitor. See Quartz documentation for examples.
TYPE:
|
timezone_id
|
string with timezone id (e.g., PST) in which to evaluate the Quartz expression.
TYPE:
|
laktory.models.resources.databricks.qualitymonitor.QualityMonitorTimeSeries
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
granularities
|
List of granularities to use when aggregating data into time windows based on their timestamp.
TYPE:
|
timestamp_col
|
Column of the timestamp of predictions.
TYPE:
|