Code navigation
Prism resolves every name in your query (CTEs, aliases, columns, tables), so the editor can jump to where a thing is defined, list every place it's used, rename it everywhere at once, and tell you what it is when you hover.
WITH failed_tests AS ( SELECT vehicle_id, make, completed_date FROM `ace-analytics.warehouse.fact_mot_test` WHERE test_result = 'FAILED' ) SELECT f.vehicle_id, f.make FROM failed_tests AS f
| Type | STRING |
| Source | fact_mot_test |
| Nullable | No |
Keyboard shortcuts
| Action | Keys | Also |
|---|---|---|
| Go to Definition | F12 | ⌘-click (Ctrl-click on Windows and Linux); right-click → Go to Definition |
| Go to References | ⇧F12 (ShiftF12 on Windows and Linux) | right-click → Go to References |
| Rename Symbol | F2 | right-click → Rename Symbol |
| Peek Definition | ⌘F12 (CtrlF12 on Windows and Linux) |
Go to Definition only appears in the right-click menu when the cursor is on something Prism can resolve. Peek Definition, despite the name, currently behaves like Go to Definition: it selects the target instead of opening an inline preview.
Go to Definition
What happens depends on what the name is:
- A CTE name (
FROM failed_tests): the cursor moves to the CTE in the WITH clause. - A table alias (
f.make): the cursor moves toAS f. F12 again on the alias declaration goes on to the CTE or table. - A column alias (
ORDER BY defect_count): the cursor moves to theAS defect_countthat defines it. - A column from a CTE: an aliased or computed column goes to its definition inside the CTE; a plain pass-through column goes to the base table’s schema.
- A schema table: opens the table’s entity tab in the schema tree. Tables you haven’t expanded are loaded on demand; a table you can’t access shows a warning.
- A schema column: opens the table’s Schema tab with that column highlighted. STRUCT fields and
UNNESTaliases are traced back to the array column. - A temp table (
CREATE TEMP TABLE): treated like a CTE; the cursor moves to the declaration. - A pipe-syntax alias (
|> EXTEND … AS x): the cursor moves to the alias. - A GQL graph variable or label: the MATCH pattern, or the
LABELclause in an in-fileCREATE PROPERTY GRAPH. - A function or a
DECLAREvariable: nothing.
Works the same in dbt and Dataform files after preprocessing; inside a Jinja expression nothing resolves.
Go to References
⇧F12 (ShiftF12 on Windows and Linux) opens the references peek under the line: every occurrence, definition included, click to jump.
WITH user_stats AS ( SELECT user_id, COUNT(*) AS n FROM `ace-analytics.warehouse.events` GROUP BY user_id ) SELECT * FROM user_stats UNION ALL SELECT * FROM user_stats
References are found for CTEs, table aliases, column aliases, temp tables, pipe aliases, graph variables, and schema columns (every use of vehicle_id from that table, qualified or not). For a CTE the list also includes its aliases and their alias.column uses. Schema tables and functions have no reference search.
Rename
F2 on a CTE, a table alias, a column alias, a temp table, a pipe alias or a graph variable renames the definition and every reference in the current editor. A CTE rename leaves aliases pointing at it alone (FROM failed_tests AS f keeps f).
Schema tables, schema columns, functions and query parameters can’t be renamed; F2 on them does nothing, silently. There is no check on the new name: if you rename an alias to a reserved word, the next diagnostic pass reports it.
Hover
Every resolvable identifier shows a Property / Value card. The rows vary by kind:
| Kind | Rows |
|---|---|
| Schema column | Type, Source (table), Nullable, then the column description |
| STRUCT field | Type, Source struct_column (table), Nullable |
| Column alias | Type: Column Alias, Alias of, Data Type, Source |
| Table | Type: Table, Rows, Last Updated, Partitioned By, Clustered By, then the description and a column list |
| CTE | Type: Common Table Expression, Defined at: line N, Columns |
| Table alias | Type: Alias, References, Target Type |
| Function | Type: Function, Returns, Parameters (optional ones marked ?) |
| DECLARE variable | Type: Script variable (INT64), Declared at: line N |
| Named window | Type: Named Window, Partition By, Order By |
SELECT vehicle_id, completed_date FROM `ace-analytics.warehouse.fact_mot_test`
| Type | Table |
| Rows | 41,203,118 |
| Partitioned By | completed_date (MONTH) |
| Clustered By | vehicle_id, test_result, make |
mot_test_id: STRING · vehicle_id: STRING · completed_date: DATE · completed_timestamp: TIMESTAMP · expiry_date: DATE? · test_result: STRINGWhen column lineage knows the position, the card gains Derives from and Side inputs rows. An unresolvable qualified column (x.foo with no x) shows no card at all; the diagnostic reports it instead. Signature help for functions is covered in auto-completions.
Inlay hints
Gray annotations Prism adds inline, no hover needed:
SELECT make, test_result, COUNT(*) AS tests FROM `ace-analytics.warehouse.fact_mot_test` AS t JOIN `ace-analytics.warehouse.dim_vehicle` AS v USING (vehicle_id) GROUP BY 1, 2 ORDER BY 3 DESC ← tests
GROUP BY 1,ORDER BY 2,PARTITION BY 1→← columnafter the number (alias if there is one, else the expression). Not insideOVER (…)or inside aggregates likeARRAY_AGG(x ORDER BY 1).GROUP BY ALL→← make, test_result, the columns it will group by. Suppressed when the SELECT has*.- Unqualified columns in a query with JOINs →
[t.]before the column, so you can see which table it came from. Not shown if the column is ambiguous. ROWS BETWEEN 2 PRECEDING AND CURRENT ROW→← 3 rows total.ROWSframes only, and only when the size is fixed.-- querylab:tablesample=1→TABLESAMPLE 1%after each table that will be sampled; see TABLESAMPLE.- In dbt and Dataform files, the compiled table name after
ref(),source(),resolve().
Settings → Editor → SQL Editor → Inlay Hints (also listed under Settings):
The helper texts describe a different feature than the toggles control today. Show parameter names turns the GROUP BY / ORDER BY / PARTITION BY position hints on and off; Show return types controls the table-source and window-frame hints; Show variable types has no effect. The dbt and Dataform hints have their own switches under Settings → SQL Frameworks.