infer_relationships
Infer missing table relationships by matching column names and types, verifying unique keys and data coverage. Propose or auto-create confident many-to-one matches.
Instructions
Auto-detect missing relationships from the DATA, not just names: finds columns matching by name + type across tables, then proves each one - which side is the unique key (cardinality + direction) and what fraction of the many-side keys exist on the one side (coverage). Returns ranked proposals with confidence; with autoCreate:true it creates the high-confidence many-to-one matches (as inactive if an active path already exists). Run this instead of guessing add_relationship calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ||
| autoCreate | No | create the high-confidence many-to-one matches automatically (default false = propose only) | |
| minCoverage | No | min fraction of many-side keys that must exist on the one side to be 'high' confidence (default 0.9) |