Documentation
¶
Overview ¶
Package create_dq_rule implements the create_dq_rule MCP tool: it creates a data quality rule (a "monitor") on an existing DQ job (dataset) via the DQ monitoring API. The agent supplies the job name, a rule name, the rule type and its SQL; the tool validates the inputs and writes the rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶
type Input struct {
JobName string `` /* 216-byte string literal not displayed */
MonitorName string `json:"monitorName" jsonschema:"Required. Rule name. Only letters, digits, '-' and '_' are allowed; max 256 characters."`
MonitorType string `` /* 137-byte string literal not displayed */
MonitorValue string `` /* 205-byte string literal not displayed */
FilterQuery string `` /* 132-byte string literal not displayed */
ColumnName string `` /* 169-byte string literal not displayed */
Description string `json:"description,omitempty" jsonschema:"Optional. Human-readable description; max 256 characters."`
Dimensions []string `` /* 197-byte string literal not displayed */
Tolerance int `` /* 179-byte string literal not displayed */
Active *bool `json:"active,omitempty" jsonschema:"Optional. Whether the rule is active. Defaults to true."`
Suppressed bool `json:"suppressed,omitempty" jsonschema:"Optional. Whether the rule is suppressed (kept but not scored). Defaults to false."`
TemplateID string `` /* 145-byte string literal not displayed */
Confirm bool `` /* 252-byte string literal not displayed */
}
Input is the tool's typed input.
type Output ¶
type Output struct {
Status OutputStatus `` /* 244-byte string literal not displayed */
Message string `json:"message" jsonschema:"Human-readable summary."`
Preview *RulePreview `json:"preview,omitempty" jsonschema:"The composed rule (with its SQL) returned when confirm=false; nothing was created."`
JobName string `json:"jobName,omitempty" jsonschema:"Job the rule was created on, on success."`
MonitorName string `json:"monitorName,omitempty" jsonschema:"Name of the created rule, on success."`
}
Output is the typed response.
type OutputStatus ¶
type OutputStatus string
OutputStatus is the overall outcome of a create_dq_rule call.
const ( // StatusSuccess means the rule was created. StatusSuccess OutputStatus = "success" // StatusValidationError means the inputs failed validation before any // write — empty required field or an unsupported monitorType. StatusValidationError OutputStatus = "validation_error" // StatusError means the rule could not be created due to a downstream // DQ service error. StatusError OutputStatus = "error" // StatusPreview means confirm was not set: the tool returned the composed // rule (including its SQL) for review and created nothing. StatusPreview OutputStatus = "preview" )
type RulePreview ¶
type RulePreview struct {
JobName string `json:"jobName"`
MonitorName string `json:"monitorName"`
MonitorType string `json:"monitorType"`
MonitorValue string `json:"monitorValue" jsonschema:"The rule's SQL that will be saved — review this with the user before confirming."`
FilterQuery string `json:"filterQuery,omitempty"`
ColumnName string `json:"columnName,omitempty"`
Description string `json:"description,omitempty"`
Dimensions []string `json:"dimensions,omitempty"`
Tolerance int `json:"tolerance"`
Active bool `json:"active"`
Suppressed bool `json:"suppressed"`
TemplateID string `json:"templateId,omitempty"`
}
RulePreview is the composed rule echoed back for review when confirm is false. It mirrors every field that will be written, so the confirm checkpoint shows the complete rule.
Click to show internal directories.
Click to hide internal directories.