SHOW TABLE JOINS

Returns how a table can be joined: the set of unique join relationships (neighbour table, the column on each side, and the join type) observed from query plans.

Category: table-infoDeltaForge extension

Syntax

SHOW TABLE JOINS [FOR] <zone.schema.table>

Description

## Overview SHOW TABLE JOINS returns the join graph for a table: one row per unique join relationship that DeltaForge has observed, captured straight from the logical plan of queries as they run. Each row names the other table the queried table can be joined to, the join column on each side, the join type, and the comparison operator. It is the SQL surface over DeltaForge's join graph (`table_join_edges`), the same source that backs the joined-tables section of the Usage tab in the desktop GUI and the VS Code extension. This is metadata about how a table is used, not a per-query log: each distinct relationship is recorded once, so the result is a compact map of the table's relationships rather than a count of every join that ran. ## Behavior - Result columns are `joined_table`, `this_column` (the queried table's join key), `other_column` (the neighbour's join key), `join_type` (`inner`/`left`/`right`/`full`/`semi`/`anti`/`mark`), `op` (the comparison operator), `base_resolved` (whether both columns resolved to real base-table columns), and `last_seen`. - Relationships are read off the engine's resolved query plan, so join type, nesting, derived-table subqueries, USING, NATURAL, and type-coercion casts on the keys are all handled; the join keyword itself is never parsed. - The data comes from the control plane. A compute node never reads the join graph directly; the command is served through the control plane API. - An empty result means no joins involving the table have been observed (for example on a table only ever queried on its own). ## Access Control Reads the join relationships of the named table; intended for users with READ on the table. ## Compatibility DeltaForge extension. There is no direct ANSI SQL equivalent; it is analogous to mining a query history for frequently joined tables, but column-accurate.

Parameters

NameTypeDescription
qualified_nameThe table to report on. May be a bare table name or a fully qualified zone.schema.table reference; matching is on the table name.

Examples

-- How can this table be joined, and on which columns?
SHOW TABLE JOINS sales.public.orders;
-- The optional FOR keyword reads the same
SHOW TABLE JOINS FOR orders;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →