Documentation
¶
Overview ¶
Package update_dq_job implements the dq_update_job MCP tool — a PARTIAL update of an existing Collibra data-quality job definition. Supply the job name plus only the fields to change; anything omitted is left exactly as it is.
The flow is a two-call converge on the public update:
Look up : GET /rest/dq/1.0/jobs/{jobName} -> on failure, relay a meaningful error; on success,
diff the job's current configuration against the requested changes (confirm_required).
Update : PATCH /rest/dq/1.0/jobs/{jobName} — only once the caller re-calls with confirm=true.
confirm=false (the default) is strictly READ-ONLY: it never reaches the PATCH. Permissions are enforced by the server; 400/401/403/404 and transport failures are surfaced as messages with actionable guidance rather than Go errors.
WHAT MERGES AND WHAT REPLACES. The public update contract is not uniformly granular, and the tool papers over that using the job it just fetched (see clients.UpdateDqJobRequest):
jobSettings, monitoringSettings merged per field by the server — only what's set is sent.
dataLocation whole-object replace; the tool OVERLAYS the caller's fields onto
the job's current location so a single field can be changed.
schedulingSettings whole-object replace; rebuilt from the schedule inputs.
notifications whole-object replace; rebuilt from the notify* inputs, so the
job's existing notification config is REPLACED, not extended.
Nothing can be unset: per the spec, null and omitted mean the same thing. A schedule is therefore switched OFF with scheduleRepeat=NEVER, which resends the current schedule with isActive=false.
SCOPE. jobType is immutable and back-runs are not part of the update contract, so neither is exposed. The scan shape (columns, row filter, sampling, time slice) is changed by editing sourceQuery directly — unlike create_data_quality_job, this tool does not recompose the SQL, since doing so needs the connection dialect and live column list and would clobber hand-edited SQL. DQ rules are managed by create_data_quality_rule / deploy_data_quality_rule_template, not here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldChange ¶
type FieldChange struct {
Field string `json:"field" jsonschema:"The part of the job being changed (e.g. schedule, monitors, sourceQuery)."`
Current string `json:"current" jsonschema:"The job's current value, or '(none)' when it has none."`
Proposed string `json:"proposed" jsonschema:"The value the update would set."`
}
FieldChange is one line of the before/after diff, so the user can see exactly what a partial update would alter before it happens.
type Input ¶
type Input struct {
JobName string `json:"jobName" jsonschema:"The name of the existing data-quality job to update."`
// --- Scan SQL. The job's source query is replaced verbatim. Use ${rd}/${rdEnd} to keep (or
// introduce) an incremental time slice. ---
SourceQuery string `` /* 443-byte string literal not displayed */
// --- Run date window. ${rd}/${rdEnd} in sourceQuery are substituted from these per run. Format
// determines the kind: 'yyyy-MM-dd' => DATE, RFC3339 => TIMESTAMP. ---
RunDate string `` /* 205-byte string literal not displayed */
RunDateEnd string `` /* 180-byte string literal not displayed */
DateFormat string `` /* 213-byte string literal not displayed */
// --- Data location (for a moved/renamed table). Provided fields are overlaid onto the job's
// current location, so you can change just one. ---
EdgeSiteName string `` /* 140-byte string literal not displayed */
ConnectionName string `` /* 155-byte string literal not displayed */
DataSourceName string `json:"dataSourceName,omitempty" jsonschema:"New data source / database name. Omit to keep the current one."`
SchemaName string `` /* 138-byte string literal not displayed */
TableName string `` /* 247-byte string literal not displayed */
// --- Monitors. AUTHORITATIVE when provided: any monitor not listed is turned OFF. Omit the
// field entirely to leave the job's monitor selection alone. ---
Monitors []string `` /* 463-byte string literal not displayed */
// --- Advanced monitor settings (adaptive behavior). Each is sent only when set, so changing
// one does not disturb the other. ---
DataLookback int `` /* 129-byte string literal not displayed */
LearningPhase int `` /* 143-byte string literal not displayed */
// --- Schedule. Rebuilt wholesale from these fields; NEVER switches an existing schedule off. ---
ScheduleRepeat string `` /* 369-byte string literal not displayed */
ScheduleRunTime string `` /* 186-byte string literal not displayed */
ScheduleDaysOfWeek []string `` /* 193-byte string literal not displayed */
ScheduleDayOfMonth int `json:"scheduleDayOfMonth,omitempty" jsonschema:"For MONTHLY with scheduleMonthlyMode=DAY (the default): day of month 1-28."`
ScheduleMonthlyMode string `` /* 163-byte string literal not displayed */
RunDateOffset string `` /* 320-byte string literal not displayed */
// --- Notifications. REPLACED wholesale when any notify* field is set. ---
Notify []string `` /* 475-byte string literal not displayed */
NotifyRowsBelow int `json:"notifyRowsBelow,omitempty" jsonschema:"Threshold for rowsBelow — alert when row count <= this. Default 1."`
NotifyScoreBelow int `json:"notifyScoreBelow,omitempty" jsonschema:"Threshold for scoreBelow — alert when score (0-100) <= this. Default 75."`
NotifyRunTimeAboveMinutes int `` /* 134-byte string literal not displayed */
NotifyRunsWithoutData int `` /* 134-byte string literal not displayed */
NotifyDaysWithoutData int `` /* 134-byte string literal not displayed */
NotifyMessage string `json:"notifyMessage,omitempty" jsonschema:"Optional global message applied to the enabled notifications."`
NotifyMessages map[string]string `` /* 177-byte string literal not displayed */
NotifyRecipients []string `` /* 200-byte string literal not displayed */
NotifyProceedWithoutUnresolved bool `` /* 282-byte string literal not displayed */
// --- PUSHDOWN compute. Sent individually, so changing one leaves the other alone. ---
PushdownConnections int `` /* 170-byte string literal not displayed */
PushdownThreads int `` /* 156-byte string literal not displayed */
// --- PULLUP sizing. Setting ANY sizing* field sends a complete manual sizing block (wizard
// default 1 for the fields left unset), switching the job off automatic sizing. ---
SizingMaxExecutors int `` /* 251-byte string literal not displayed */
SizingExecutorCores int `` /* 132-byte string literal not displayed */
SizingExecutorMemoryGb string `` /* 174-byte string literal not displayed */
SizingDriverCores int `json:"sizingDriverCores,omitempty" jsonschema:"PULLUP manual sizing: driver cores. Default 1 when manual sizing is engaged."`
SizingDriverMemoryGb string `` /* 166-byte string literal not displayed */
SizingMemoryOverheadGb string `` /* 170-byte string literal not displayed */
SizingNumPartitions int `` /* 178-byte string literal not displayed */
ParallelJdbcMode string `` /* 348-byte string literal not displayed */
ParallelJdbcPartitionColumn string `` /* 126-byte string literal not displayed */
ParallelJdbcPartitionNumber int `` /* 144-byte string literal not displayed */
SparkSqlProperties map[string]string `` /* 176-byte string literal not displayed */
AcknowledgeDescriptiveStatistics bool `` /* 219-byte string literal not displayed */
Confirm bool `` /* 236-byte string literal not displayed */
}
Input — jobName identifies the job; every other field is optional and OMITTING IT LEAVES THAT PART OF THE JOB UNCHANGED. Grouped the same way as create_data_quality_job's input so the two read alike.
type Output ¶
type Output struct {
Status Status `json:"status" jsonschema:"updated | confirm_required | needs_input | error."`
Message string `json:"message" jsonschema:"Human-readable outcome and what to do next."`
JobName string `json:"jobName,omitempty" jsonschema:"The job that was updated (or, on confirm_required, the one to confirm)."`
JobType string `json:"jobType,omitempty" jsonschema:"The job's execution type (PUSHDOWN/PULLUP). It cannot be changed by this tool."`
Changes []FieldChange `` /* 159-byte string literal not displayed */
Request *clients.UpdateDqJobRequest `` /* 223-byte string literal not displayed */
JobDetailsLink string `json:"jobDetailsLink,omitempty" jsonschema:"Job Details deep-link path (relative to the Collibra instance URL)."`
Warnings []string `` /* 171-byte string literal not displayed */
Guidance string `json:"guidance,omitempty" jsonschema:"On confirm_required/needs_input/error, what to do next."`
}