Suggest missing relationships, checked against the data
suggest_relationshipsFinds columns that look like references to another table's key but are in no relationship, ranks them and counts the best against the data (share of values found, distinct values). Requires workspace and source. Returns JSON candidates, each with a confirmed entry for plan_backend or create_backend. Read-only counting queries; applies nothing. 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": "suggest_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Primary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}. | |
| check | No | How many top candidates are counted against the data. Default 15. Example: 5. | |
| schema | No | Schema in the source. Default "dbo". | dbo |
| source | Yes | Lakehouse, warehouse or SQL database, name or id. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |