Create or alter T-SQL views in a schema of their own (dry run by default)
create_viewsCreates or alters wide T-SQL views over the plan on the source's SQL analytics endpoint or warehouse: one per fact table with its dimensions, one per header table. Requires workspace and source; rights to create objects (Contributor is enough). Returns JSON with the SQL; with dry_run=false also what ran. Changes Fabric only with dry_run=false and only in views_schema: CREATE OR ALTER replaces views of the same name; nothing is dropped. Errors: {error, kind, hint}.
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": {
"workspace": "<workspace>",
"source": "<source>"
},
"name": "create_views"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Primary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}. | |
| schema | No | Schema in the source. Default "dbo". | dbo |
| source | Yes | Lakehouse, warehouse or SQL database, name or id. | |
| dry_run | No | true (default) returns what would be created and the REST calls, changing nothing; false creates or updates. | |
| confirmed | No | Relationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}]. | |
| workspace | Yes | Fabric workspace, name or id. | |
| views_schema | No | Schema the T-SQL views go into; created if missing. Default "krusgraph". Example: "reporting". | krusgraph |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |