findJoinPaths
findJoinPathsDiscover join paths connecting two known tables by traversing foreign keys and observed join edges, revealing unknown intermediate relationships.
Instructions
Find join paths when both endpoint tables are known but the intermediate relationships are not. Traverses declared FK and optional observed join edges in both directions; for one table's immediate neighborhood, use tableContext.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toTable | Yes | ||
| maxDepth | No | Maximum FK hops. Default 4. | |
| maxPaths | No | Maximum paths to return. Default 5, max 25. | |
| toSchema | No | ||
| fromTable | Yes | ||
| scanLimit | No | Maximum tables to scan (default 300). | |
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. | |
| fromSchema | No | ||
| includeObserved | No | Include usage-catalog equi-joins (default: catalog enabled). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Join paths from the source table to the target table; each path is an ordered list of steps. | |
| toTable | No | ||
| maxDepth | Yes | Maximum relationship traversal depth that was applied. | |
| toSchema | No | ||
| fromTable | No | ||
| pathCount | Yes | Number of join paths returned after caps were applied. | |
| fromSchema | No | ||
| includeObserved | Yes | True when usage-catalog observed joins were included as relationship evidence. | |
| schemaTablesScanned | Yes | Number of schema tables inspected while searching the relationship graph. |