apply_cleansing_plan
Validate and apply a data-cleansing plan. THIS CHANGES REAL DATA in the model's current physical snapshot table. Requires confirm=true.
Instructions
Validate and apply a data-cleansing plan. THIS CHANGES REAL DATA in the model's current physical snapshot table. Requires confirm=true.
Default mode: pass plan directly, built from propose_cleansing_plan's
output -- validated against the operation vocabulary and the model's
schema before any step runs, same as always.
If this server requires plan approval (DATAVEIL_REQUIRE_PLAN_APPROVAL=
true): pass plan_id instead, from a plan that was registered
(register_cleansing_plan) and then approved (approve_cleansing_plan) by
someone else. confirm=true is still required on top of that approval,
not instead of it.
Note: this writes directly to the model's physical table, outside SQLMesh's own state tracking. A FULL-kind model is fully rematerialized on its next scheduled run/plan apply, which will silently undo the cleansing -- it was never folded into the model's SQL definition. Re-apply after any such rerun if the cleansing still applies.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_name": "<model_name>"
},
"name": "apply_cleansing_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | ||
| confirm | No | ||
| plan_id | No | ||
| model_name | Yes |