Documentation
¶
Overview ¶
Package sqltables extracts the physical tables a SQL statement reads.
It is one extractor, not one per caller: semantic enrichment names the tables it must fetch context for, and the call catalog names the datasets a recorded query addressed (#1321). Both are answering the same question, and a second implementation of it would mean an enriched table and a cataloged target disagreeing about what a query touched.
The extraction is lexical (regular expressions over FROM and JOIN clauses, plus Trino's Elasticsearch raw_query table function), not a parser: it names what a statement plainly reads, drops common table expressions, and makes no claim about a statement it cannot parse.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ref ¶
type Ref struct {
Catalog string
Schema string
Table string
FullPath string
Source string // "FROM", "JOIN", "TABLE_FUNCTION"
}
Ref is one table a statement reads.