Databricks Explorer (v0.7)
Local Flask app plus a React UI to browse Unity Catalog, draw relationships (lineage, FKs, view deps, and stored ones such as user-drawn edges), and build query canvases. It runs on your computer and listens on 127.0.0.1 only.
Install
You need uv and Python 3.11 or newer (uv fetches Python if you have none). You do not need Node: the web UI is built into the package.
uv tool install databricks-explore
databricks-explore
It prints the address (http://127.0.0.1:8765 by default) and opens it in your browser.
- Upgrade:
uv tool upgrade databricks-explore - Uninstall:
uv tool uninstall databricks-explore(your data folder stays; delete it by hand if you want it gone) - One run without installing:
uvx databricks-explore
Options of databricks-explore (also python -m databricks_explore):
| Option | Effect |
|---|---|
--demo |
serve an invented workspace, no Databricks needed (see below) |
--redacted |
with --demo, make query history text read <REDACTED> |
--port N |
listen on this port (default 8765, or 8767 with --demo; the PORT variable does the same) |
--data-dir DIR |
keep the app's files in DIR (EXPLORER_DATA_DIR does the same) |
--no-browser |
print the address, do not open a tab |
--debug |
Werkzeug debugger and reloader (the debugger can run code from an error page) |
Where your data goes
The cache, logs, diagrams, canvases, relationship stores and the MCP token live in your per-user data folder, never inside the installed package:
| System | Default folder |
|---|---|
| macOS | ~/Library/Application Support/databricks-explore |
| Linux | ~/.local/share/databricks-explore (or $XDG_DATA_HOME/databricks-explore) |
| Windows | %LOCALAPPDATA%\databricks-explore |
Demo mode uses a demo/ folder inside it, so invented canvases never mix with real ones. --data-dir or EXPLORER_DATA_DIR replaces the whole folder (demo mode then uses it as is). The command prints the folder it uses at startup. Paths such as data/canvases/ elsewhere in this README and in contracts/ mean canvases/ inside this folder. If you ran an earlier version from a source checkout, its data/ folder is not used any more: the command prints a hint, and --data-dir ./data keeps using it.
Dev mode with hot reload: see Development below.
Run without Databricks
Demo mode serves invented catalogs, tables, views, foreign keys, lineage and query results from a fake workspace. It never contacts Databricks, so it is safe for trying the UI, screenshots and tests.
databricks-explore --demo
# http://127.0.0.1:8767 opens; pick profile "demo", Connect, pick warehouse "Demo Serverless"
EXPLORER_DEMO=1 does the same as --demo. Demo mode listens on port 8767 (--port or PORT overrides) so the browser keeps its saved profile apart from real use, and it writes to the demo/ folder described above.
Magic words in a query (the rest of the SQL is ignored; any query returns a result):
| Word | Result |
|---|---|
demo_slow |
stays running for 45 seconds, to test Cancel and the timer |
demo_error |
fails with a table-not-found message |
demo_wide |
a 60-column result |
demo_big |
50,000 rows, so the 5,000-row cap and the truncated badge show |
Otherwise the result follows the first demo table named in the SQL (demo.sales.orders by default: 3,000 rows with ids, timestamps, dates, decimals, nulls, empty strings and long text). GROUP BY or count( gives a daily series for the Chart tab. A trailing LIMIT n is honored.
Demo mode also has a second catalog, demo_lake: an invented lakehouse of about 30 objects (bronze raw tables loaded from files, silver tables written by CTAS, INSERT and MERGE, a notebook and a pipeline, and a gold star schema with a composite key, a nullable reference, a reference with orphans, a self-referencing dimension, a materialized view and a metric view). It has table and column lineage with writers (job, notebook, pipeline, file) and statement_ids, the statement text in system.query.history (ask by statement_id, or join system.access.table_lineage on it), and answers to DESCRIBE DETAIL, DESCRIBE HISTORY, SELECT count(*) and a profiling statement (a LEFT ANTI JOIN over two tables). demo_lake.silver.shipments is the one late table, and demo_lake.silver.customers ends on an OPTIMIZE. Lookups across the whole metastore (a bare name search, tag lookups without a catalog) leave it out, so type demo_lake. or name the catalog to reach it. Everything is generated in code, in demo_lake.py, demo_lake_sql.py and demo_history.py.
Demo mode also has an invented query history (a few hundred statements by six fake users, with the hard SQL cases), table lineage and column lineage, so mining joins works offline. databricks-explore --demo --redacted (or EXPLORER_DEMO_REDACTED=1) makes every statement read <REDACTED>, to try the blocked path. In an ordinary demo three rows are redacted and get skipped. Mining state is kept in demo/relationships/ in the data folder; delete it to start over.
Use
- Top bar: pick a profile and Connect (browser login if needed). Pick a SQL warehouse to enable queries on the canvas and search across all catalogs.
- Graph tab
- Picker modes (remembered): Drill-down, Tree, Search. « collapses the picker.
- Type chips under the filter (Tables, Views, Mat. views, Metric views, Functions) narrow the list in all three modes, and the status line counts what is left (
12 of 80 objects). Chips for types the list has none of are greyed. The choice is remembered. Functions are listed with the tables (a schema's functions, and function names in Search); clicking one putsDESCRIBE FUNCTION EXTENDEDin a new query window without running it, and the right-click menu has that and Copy full name. - In Drill-down the box holds the path (
dev.hr.emp). Clicking a catalog or schema writes its path and leaves the cursor in the box, so you can keep typing the next part without clicking back in. - Click node/edge for details; double-click node to expand; drag to arrange; Reset layout re-runs auto layout. Remove from graph (or Delete/Backspace) takes the selected tables off the graph with their edges; a neighbor's count, the picker or Add to graph brings one back. Clear empties the graph. The layout (ELK, loaded when the Graph opens) runs flow left to right and orders tables by where their column edges leave and arrive, so column edges cross as little as the row order allows; adding tables or changing a table's columns keeps the order of the ones already there, and Reset layout starts over.
- Clicking an object in the picker starts a new graph. To add one next to what is there instead (two similar views side by side, say), use the row's + button, Shift-, Cmd- or Ctrl-click the row, or drag it onto the graph. It comes with its connections, edges to tables already on screen are drawn, and the edge filters never hide it. Parts of the graph with nothing between them are laid out as separate bands, top to bottom.
- Edges come in three families, drawn in three line styles: data flows (lineage and view dependencies: a solid dark arrow, left to right), key reference (foreign keys and joins: a thinner teal line with no arrowhead, which hangs above or below the table it joins instead of pushing it right) and meaning link (concept, ontology and sketch links: a light dotted line, off until you tick it). A dashed line means the relationship is inferred or proposed (a mined join nobody accepted), not declared or measured. Checkboxes under Show hide each family, and More hides single kinds. The legend lists only the line styles on screen, superseded edges and rejected edges are hidden by default, and an edge's details start with a From line that says what it stands on (
foreign key constraint fk_orders_customer,definition of view v_daily_revenue,drawn by you). Reference edges carry crow's-foot ends where keys and nullability say how many rows match:o<zero or more,o|zero or one,||exactly one (a foreign key to a primary key with NOT NULL columns). A plain end means unknown, never "one", and the details say why each end is drawn. An edge is superseded when it no longer holds: lineage from a source a view's current definition no longer reads, or from before the table was recreated. Age alone never dims or hides an edge. A view and its source are one edge, and a neighbor that does not exist (a renamed catalog, a dropped table) is drawn dashed with no fill and says why, and where it may have gone, in the details panel. A↻before a name marks a table that reads its own data or has a foreign key to itself, and a smallfilesmark one that lineage shows loaded from files; the details panel lists which keys and which paths (or that a path is not visible to you). Where a node has edges coming in and going out on the same side, on the Graph (tables and column rows) and on the Canvas (connectors with arrowheads), they attach at two points, in above or left of out, so an arrowhead never sits on the start of another line; a side with edges one way keeps its center. A table with lineage or view-dependency neighbors that are not on the Graph shows small counts at its sides (upstream left, downstream right), read table by table and never saved; click one to add that side one hop, Shift-click to follow the chain to its end (at most 60 tables, with a note), and the details panel adds or collapses a side. A collapse removes only what that expansion added and nothing else on the Graph is still connected to. The counts follow the filters, so superseded edges are not counted unless shown. - Drag from the green dot on a hovered table node onto another node to store a manual edge between them.
- Query these tables (details panel) writes a
SELECTthat joins the selected tables (shift-click or drag a box to select several) along known relationships, adding any tables needed in between, with short aliases andLIMIT 100, and opens it as a new query window on the canvas. With no chain of known relationships between them it says so and writes nothing. - Send to canvas (details panel) adds the selected tables (Shift-click, Cmd/Ctrl-click or drag a box to select several; the panel lists them) as table cards, laid out left to right by dependency to the right of what is already on the canvas, with a connector for each known relationship among them: foreign keys, mined and manual joins (labeled with the join columns), and lineage and view dependencies (labeled
lineageorview, arrow from the table that is read to the one built from it). A table that already has a card gets none, and the connectors still reach it. With one table selected, Send downstream path and Send upstream path send that table and the chain of lineage and view dependencies the graph shows from it (double-click nodes to load more of the chain first). Undo the connectors with Cmd/Ctrl+Z on the canvas. - Lens (toolbar: Flow, Model, All) is a preset for one question; the tables stay the same. Flow ("where does this come from?") shows the data-flow edges left to right, with their transform glyphs and no columns. Model ("how do these tables join?") shows only key references, with crow's-foot ends, the keys level of columns and the grain on every card. Its layout puts the facts (tables that reference others and aren't referenced) in a middle row, the tables they reference above and below, a table two facts reference between them, and a dimension of a dimension one row further out. The role is inferred for the layout and listed in Details as "Fact" or "Dimension" with its reason; it isn't stored. All is the whole graph. Each lens keeps its own positions, so moving a table in Model leaves Flow as it was. The edge checkboxes and the legend follow the lens; changing one marks the lens "modified", with a Reset. The lens and the positions of the other lenses are saved with the diagram (
lens,lens_positions), and the Export dialog offers the flowchart first for Flow and All, the ER diagram first for Model. - Group by (toolbar) draws the tables of one schema (or one tag's value) as a light box with its name. A group of more than 8 tables that holds neither the focus nor a table you added on purpose starts collapsed: one node,
bronze · 14 tables, whose edges to the outside merge into one per node and family, labeled with a count (3 edges; click it for the list). The count is what opening the group shows under the current filters. Click the arrow on a group's node or box, or double-click the node, to open or collapse it; the panel lists every group with Collapse all and Open all. A graph in one group, and a group of one table, are left alone. Chains (on by default) leaves out a view or materialized view with one flow edge in, one out and nothing else, and draws its neighbors as one edge markedvia 1 view(via 3 viewsfor a chain); click the pill to draw the views. A view with a second reader, the focus, a pinned table or a column level on is never left out. The grouping and which groups you opened or collapsed are saved with the diagram (grouping), andget_graphlists the groups and the chains. Export (the picture and the Mermaid text) draws what is on screen: a collapsed group as one node and a chain as one edge (MCPexport_graphdoes the same for a saved graph, or every table withexpand_groups). - Color by (toolbar) says what a node's fill means: the object's type (the default), schema, catalog, owner, a tag's value, certification, or freshness (late or on time). One thing at a time, and the legend in the details panel lists only the values on screen. A value keeps its color in every graph (eight light colors, then "other" in grey; a node with no value stays white). Owner, schema and catalog need no warehouse. Tag is off without a SQL warehouse: pick a key from the tags read so far, or use Read tags…, which shows the SQL first and caches the answer. The kind of object (table, view, materialized view, streaming table, metric view, external or foreign table) is always a small icon before the name. The choice is saved with the diagram, and agents set it with
color_byoncreate_graphandupdate_graph. - Show columns applies to the whole graph: tables you expand afterwards show their columns too. A node's column button cycles three levels: none, keys (the toolbar's level) and all. At keys a column earns its row by being a primary key (a small key before its name), a foreign key (a small arrow, both for a column that is both) or by having a column edge on screen, in table order, then a
+38 morerow that opens all of them. Types read as their base (struct<…>). A foreign key between two shown rows is one reference edge per column pair, with its crow's-foot ends at the rows, and the table-level edge gives way. Changing a node's level lays out again only the part of the graph that holds it, and the whole graph when that part would then overlap another. - Click an edge to see its provenance, evidence and status. A mined or manual edge lists the columns it joins, one line per key set (a composite key is one line with its columns ANDed) with its runs. A stored edge can be Accepted or Rejected, and any edge can carry a note.
- Save diagram keeps positions →
data/diagrams/. Rename and Delete act on the diagram picked in the list (a deleted one is kept indata/diagrams/.trash/). A diagram saved or changed by an agent shows up in the list, and when it is the one open, the page reloads it (or asks, if you changed the graph since you loaded it). Saving over a newer version asks first. - Export… (toolbar) makes a picture that explains itself: a title (the saved graph's name, editable), an optional caption, the picture itself (the whole graph or the current view), a legend of only what is drawn (the edge families, dashed, crow's-foot ends, key markers, what the fill means) and the date its facts were read (the oldest cached read among the evidence shown, else the day of the export). Download PNG or Copy image. Copy Mermaid flowchart and Copy Mermaid ER put text on the clipboard for a pull request, wiki or README, where GitHub draws it: the flowchart for data flows, the ER diagram for key references with crow's-foot ends and key columns. Nothing is uploaded. MCP
export_graphgives an agent the same two things for a saved graph.
- Canvas tab
- + Query window or double-click the empty canvas adds a SQL window. Results appear in a grid, and the Chart tab draws a Vega-Lite chart. The window title bar has a maximize toggle that fills the canvas and restores the previous size.
- Run: Cmd/Ctrl+Enter (or Run) runs the selection, or else the statement under the cursor. Shift+Cmd/Ctrl+Enter (or Run all) runs every statement in order, stops at the first error and shows the last result. Statements are split on
;, not inside strings, quoted names or comments. The text that ran flashes. Cancel stops the running statement and the rest of a script, and a timer shows how long it has run. - Saved results. After a successful run, the window keeps its result (up to 500 rows and about 256 KB) in the canvas file, and remembers whether it showed Results or Chart. Open the canvas and every window shows its grid and chart at once, with a line such as "Result from 3 hours ago, 12 rows · Run to refresh". When the SQL (or a window it references) has changed since, the line turns yellow with a stale mark. Run all windows in the Canvas toolbar runs every query window, a window that references another through
{{title}}after it (up to four at once), with Stop while it runs; keep the Canvas tab open until it finishes. - Result grid: columns are typed. Numbers sort and filter as numbers and are right-aligned, dates use the date filter, NULL shows as dim italic
NULL(an empty string stays blank), and the type is under the column name. Values are shown exactly as the warehouse returned them, except that timestamps drop theTand an all-zero fraction. - Selecting: the grid selects like a spreadsheet. Click or drag cells; Shift extends and Cmd/Ctrl adds a range. The numbers on the left select rows, a column header selects the column, and the corner (or Cmd/Ctrl+A) selects everything. Arrow keys move, Shift+arrows extend, Cmd/Ctrl+Shift+arrows go to the edge, Esc clears. Sorting is the small arrows in a header (shown on hover). Double-click a cell to read its full value (JSON is pretty-printed). With several cells selected, the bar shows Count, Distinct, Nulls and, for numbers, Sum, Avg, Min and Max.
- Copy: errors and the summary are selectable. Cmd/Ctrl+C copies the selection as TSV with headers (a single cell copies just its value; several unrelated ranges copy the last one, and the message says so). Right-click a cell for copy value, row or column, Filter grid to this value, Exclude this value, Copy as WHERE col = value, and Copy as TSV, CSV, Markdown, JSON or a SQL IN list (of that column), with or without headers, for the selection (or all rows when only one cell is selected). Right-click a header to copy the name or values, hide, pin, autosize, or open Value counts in new query window (not run). Copy all as… does the same for every row after filters and sort, and Export CSV downloads them.
- + Note adds a Markdown note. Drag a table from the picker to add a table card; Query this on a card creates
SELECT * FROM <table> LIMIT 100. - Minimap is off until you turn it on with the button in the canvas's top-left corner. The Details panel is collapsed on this tab.
- Join-aware completion: after
ON, the editor offers the join conditions known between the tables already in the statement and the one just joined, with your aliases, best first (foreign keys and accepted joins, then manual ones, then proposed ones by runs; rejected ones never). The detail says where each came from (FK,mined: 37 runs,manual).USING (offers the shared columns, andJOINoffers tables known to join to the ones in FROM. Foreign keys are read from the tables in the statement, so a key declared by another table shows up when that table is the one being joined. - Reference another window in SQL as
{{title}}. The canvas draws a read-only link to it. - Save, Save as, and Open store canvases in
data/canvases/. Named canvases autosave. New diagram starts a blank sketch under the next freediagram-Nname. It needs no profile or warehouse. - Sketching (draw.io-style, on the same canvas as the query windows). The left palette places a rectangle, rounded rectangle, ellipse, diamond, database, text, sticky note, frame or placeholder table: click for a default size, or drag to draw your own. Double-click (or Enter) edits a label in place. Drag from a side handle of any node to another to draw a connector, and drag a connector's end to reconnect it. Left-drag on the background is a marquee; pan with the hand tool, the space bar, or the middle or right button. Shortcuts: V select, H pan, C connect, R rectangle, U rounded, O ellipse, D diamond, B database, T text, S sticky, F frame, P placeholder table, Q query window, N note, G grid snap; Cmd/Ctrl+Z undo (Shift: redo), C copy, V paste, D duplicate, A select all,
]and[forward and backward (Shift: front and back), Shift+L lock; Delete removes sketch nodes, connectors, table cards and empty notes and query windows (a note with text or a query window with SQL keeps its ✕ button, so one stray key cannot throw it away); arrows nudge. Properties (button in the bottom bar) opens the Details area with the selection's label, shape, colors, font size, position, lock, and for a connector its line type, arrowheads, dash, color and label. Arrange aligns, distributes, orders and locks a selection. Export saves the canvas or the selection as PNG or SVG (the SVG embeds the page content, so some vector editors cannot open it). - A placeholder table is a table that does not exist yet: edit its name, and each column's name, type and key marker (click the box to cycle PK and FK) on the card. Link it to the real table once it exists and the card shows the real columns and marks differences. A connector between two tables (real or placeholder) can be saved to the relationship store as a
sketchedge from its Properties, with optional columns. Nothing is saved to the store automatically. - Gray thin links are derived from SQL (
{{title}}references and tables a query reads) and are read-only. Dark connectors are yours.
Ask
The Ask tab puts a question to Databricks Genie One in plain language. Press Enter to ask (Shift+Enter for a new line), and the turn shows Genie's progress steps while it works. The answer is Markdown (no raw HTML is rendered). Each SQL statement Genie ran has Show result (a grid, fetched when you ask for it) and Open in Canvas (a new query window with that SQL). Each table the answer links to is a chip with Open in Graph and Link to concept... (pick or create a concept, then add a describes link). Cancel stops a running turn, follow-up questions continue the same conversation, New conversation starts over, and Open in Databricks goes to the thread in the workspace.
It talks to the workspace's Genie One MCP server as the connected user, so it needs EXECUTE on system.ai.genie_one_mcp, and it sends the selected SQL warehouse along. Nothing is saved: questions, answers and results live in the page until you reload it, and calls.jsonl records only that a call happened. Demo mode has canned answers (try "revenue by status", "customers per country", fail and demo_slow). See contracts/api.md, section 7.
Relationships
Edges come from one place, GET /api/relationships?table=<name>. Foreign keys, lineage and view dependencies are derived from the cached Unity Catalog data on every read and are never stored. Everything else (mined joins, manual and sketched edges, concept links, ontology imports) is kept in data/relationships/<profile>.sqlite, one file per profile, each edge with its provenance and a status of proposed, accepted or rejected. A note on a derived edge is stored separately and follows the edge.
Mining joins (Graph tab, Mine joins) is an explicit batch run through the selected SQL warehouse. It shows the SQL and time window first, then reads system.query.history and system.access.table_lineage, extracts the columns each statement joins on, and stores them as proposed join_mined edges with run and user counts. Statement text and user names are never stored. Reading query text needs an account admin or databricks_pii_access; without that the run stops and says so. Later runs are incremental. The joins a view's SQL defines are read whenever the view is read, with no warehouse: they are preferred by Query these tables and by ON completion, listed in the view's Details, and marked "also joined in view X" in the suggestions. Review the results in Suggested relationships, and see a Usage summary of the busiest tables. A node's cols button shows its columns, with column lineage and mined joins drawn between them. Column lineage comes from system.access.column_lineage, one cached query per table; with no warehouse (or one that will not start, or whose system table has no rows for the table yet) it comes from the REST column-lineage API and from a view's own SQL instead. GET /api/relationships/export and POST /api/relationships/import move stored edges as JSON. See contracts/api.md, section 4.
Grain, size and freshness (Graph tab). A card says what one row is, under its name, only when that is known: per order_id × line_no from a declared primary key, else from a view's GROUP BY (per customer_id × order_date), a row_number() = 1 dedupe (per k (latest)) or SELECT DISTINCT (distinct rows). A flow edge into a GROUP BY of a different grain carries a Σ, and its Details show per a → per b. Size and history… (toolbar) shows the SQL first, then runs DESCRIBE DETAIL and DESCRIBE HISTORY on the selected warehouse for the ticked tables (or all of them) and caches the answers with the time they were read. Cards then show a size badge (12M rows, or 3.1 GB when the rows are not known) and an amber dot when a table is late (no write for over twice its own cadence and over an hour; OPTIMIZE, VACUUM and tag changes are not writes). Details show rows, size, files, clustering, the last write and who made it, the cadence and the rows of the last 20 writes, with Read again. Views, metric views and materialized views have no size to read (streaming tables do). See contracts/api.md, section 5.
Transforms on a flow edge (Graph tab). When the app has the SQL behind a flow edge, up to two small icons sit at its target end: Σ aggregates (GROUP BY), ⋈ joined in as a lookup (on the joined source's edge only, never the driving FROM), ∪ one of several UNION branches, 1 keeps one row per key (row_number() = 1, DISTINCT) and ▽ filtered (WHERE, QUALIFY, EXISTS, IN, semi and anti joins). No icon means the source passes through or nothing is known. A view's or materialized view's own SQL is read with no warehouse. For a table, the SQL is the statement that last wrote it, read from system.access.table_lineage and system.query.history: select the edge and click Read the statement that wrote it, which shows the statement first, runs it on the selected warehouse and caches the answer. A table written by a notebook, job or pipeline says so and has no SQL to read. The edge's Details then have a How section: the role (driving table, join type and keys, union branch), the filters as SQL, the GROUP BY and dedupe keys, MERGE keys, where the SQL came from, and Show SQL, which puts it in a Canvas query window without running it. SQL that does not parse leaves the edge with no icon and a note. MCP get_graph and lineage report each edge's transform from the cache. See contracts/api.md, section 5.
Trace a column (Graph tab). Right-click a column row (or use the column list in a table's Details) for Trace upstream, Trace downstream or Trace both: "where does this number come from?" and "what breaks if I change it?". The path is drawn at full strength and the rest of the graph fades but stays where it is. Tables on the path that were not on the graph are added, and show only the columns the path uses. Each hop is a flow edge between two column rows with a small label at its target end for what the SQL does to the column: = (same column), → (renamed), cast, ƒ (a function or expression), Σ sum (an aggregate) or case. The class comes from a view's definition or from a table's writing statement once it has been read (the Details section shows the SQL it would run first and reads it on a click); a hop with no known SQL has no label. Details lists the trace upstream first, one line per hop, and the dashboards, notebooks and jobs lineage names as reading the end tables under Read by. Esc or Clear trace ends it and removes the tables the trace added. Agents use trace_column, which can also add the traced tables to a saved graph.
Profile a relationship (Graph tab). Keys are not enforced and mined joins are guesses, so a reference edge can be measured: right-click it, or press Profile… in its Details (or Profile relationships… in the toolbar for the ticked tables, or all of them). A dialog shows the SQL first; nothing runs until you press Run, and Open as query puts the same statement in a query window instead. One read-only statement per relationship groups both tables by key and counts rows, null keys, distinct and repeated keys, orphans (keys with no match in the referenced table), unused keys and rows per key. Only counts are kept, with the time they were measured, so a saved graph shows them without running again. The edge's ends then come from the numbers (|| when the referenced key is unique, |< when every key of it is used, and so on), Details show them and say how many rows are orphans (1.2% of orders (3,410 rows, 212 keys) have no match in customers), and a relationship with orphans gets a small red tick near the referenced table; a clean one gets nothing beyond its ends. Agents use the profile_relationship tool (it plans without confirm: true). See contracts/api.md, section 5.
Concepts
The Concepts tab is a small business glossary over the catalog. It is shaped like an ontology, so a later import of Databricks' Genie Ontology (domains, certified terms, synonyms, metric views) can map onto it. A concept has a name (unique, ignoring case), a definition, synonyms, a domain, a status of draft, reviewed or certified, tags and provenance (manual, uc_tag or ontology). It links to a table (a metric view is a table), a column or another concept, with a relation: defines, measures, identifies or describes for tables and columns, is_a, part_of or related_to between concepts. Links are concept_link edges in the relationship store, so they travel with its export and import, and deleting a concept deletes its links.
- Find candidates searches the names and comments of the tables and columns already in the local cache for the concept's name and synonyms, and lists hits to link in one click. It never touches the warehouse, and only knows what you have browsed.
- Suggest from tags... shows the read-only SQL over the
system.information_schematag tables, then runs it on the selected warehouse and makes one draft concept per tag key and value, linked withdescribesto the tagged tables and columns. Running it again updates those concepts and keeps your edits. Demo mode has a few tags to try it. Tags whose name starts withsystem.(such as the certification tag) are skipped. - Import from Databricks... shows every REST call and SQL statement first (all read-only), then reads Genie Ontology domains and pages (Beta endpoints; a 403 or 404 is reported as "not available on this workspace"), and the measures and dimensions of metric views (found through
system.information_schema.tables, each column's display name, synonyms and comment read withDESCRIBE TABLE EXTENDED <view> AS JSON, falling back to the view's YAML definition when that fails). They become concepts with originontology; measures and dimensions are linkedmeasuresordescribesto the metric view's column. Running it again updates by source, keeps your edits to fields the source did not change, and removes only the links the import made. Demo mode fakes all of it. - Certification badges. The
system.certification_statustag (certifiedordeprecated) is shown as a badge on table nodes in the Graph tab and next to link targets in the Concepts editor. The badges come from a local cache (certification.jsonin the profile's cache folder), so opening a tab never runs a query and never wakes a stopped warehouse. The Graph toolbar and the Concepts links section showCertification: <age>(orCertification: not loaded) with a refresh button, which runs the one query on the selected warehouse and is disabled while none is selected. "Import from Databricks" refreshes the cache as one of its steps. - On the Graph tab, the Concepts toggle draws the concepts linked to the tables on the graph as diamond nodes, with an edge to the table, or to the column when a column is linked. Click one to open it in the Concepts tab.
- Export and Import use the relationship store's JSON file (
contracts/api.md, sections 4 and 6).
Layout tools
layout.py checks and fixes where things sit on a canvas, for people and for agents that edit canvases. It is pure (no Flask, no SDK, no randomness) and works on the saved canvas format. Locked nodes never move, and frames hold nodes by geometry.
- Doctor (Canvas toolbar) opens a panel with a 0-100 layout score and the issues: overlaps, near-miss alignment (1 to 6 px), uneven spacing in rows and columns, connectors through nodes, connector crossings, connector sides facing away, nodes sticking out of a frame, labels that do not fit, outliers, and off-grid nodes when grid snap is on. Click an issue to select and zoom to its nodes. Fix applies the automatic fix for that issue, Tidy all applies every one with the smallest moves (it never makes a second change to a tidied canvas), and Tidy selection moves only the selected nodes.
- Arrange selection lays the selected nodes out as a grid, row, column, or a layered flow (left to right or top to bottom) from their connectors. The selection's top-left corner stays put, and it is shifted if it would land on other nodes.
- Every Fix, Tidy and Arrange is one undo step (Cmd/Ctrl+Z). Nothing is saved until the canvas autosaves or you save it.
- The same functions are served as
POST /api/layout/doctor,tidy,arrange,describe(a compact text summary for a language model) andrender(a PNG of what a reader sees: labels, note text, SQL and saved results), each taking an unsaved canvas or a saved name. Seecontracts/api.md, section 3b. python scripts/layout_bench.pyperturbs three generated canvases (a flow, a grid of query windows, frames with members) with jitter, overlaps, off-by-a-few alignment and connectors on the wrong sides, runstidy, and prints the doctor metrics before and after. Its output (seed 7, no grid):
== flow: 9 nodes, 9 connectors
clean score 100 overlap 0 crossings 0 align 1.00
perturbed score 66 overlap 1785 crossings 1 align 0.00
tidied score 88 overlap 0 crossings 0 align 1.00
== query grid: 12 nodes, 8 connectors
perturbed score 28 overlap 107620 crossings 2 align 0.08
tidied score 84 overlap 0 crossings 3 align 0.57
== frames: 15 nodes, 5 connectors
perturbed score 32 overlap 16182 crossings 0 align 0.29
tidied score 88 overlap 0 crossings 0 align 0.92
When tidy grows a node to fit its label, or finds a connector label with too little room, it pushes the nodes beyond that edge outward by the missing space instead of leaving them touching, and overlap separation leaves at least 16 px (more for a labeled connector). What tidy leaves is mostly connectors that pass through nodes. Those need a different arrangement, not a nudge, so Doctor reports them without a Fix.
Use from an agent (MCP)
A coding agent such as Claude Code can explore the catalog and work on canvases next to you, through an MCP server inside the app (/mcp, streamable HTTP, this computer only). Click Agent access in the top bar, then Copy command and paste it into a terminal once:
claude mcp add --transport http databricks-explore http://127.0.0.1:8765/mcp --header "Authorization: Bearer <token>"
The panel shows the real command (the port is the app's, 8767 in demo mode) with the token hidden until you tick Show token. New token replaces it, and agents that had the old one are refused until you give them the new command. The token is created on first run in data/mcp_token (mode 0600), and requests from another host or a web page are refused.
- What it can do. Read the catalog (search, describe with its Unity Catalog tags and certification, find tables by tag, list), relationships, mined join suggestions and usage, and concepts; add manual relationships and review them; create and link concepts; run read-only SQL (one
SELECT,DESCRIBE,SHOWorEXPLAIN, checked with sqlglot, capped at 1000 rows and a timeout, cancelled when slow); and edit canvases (add shapes, text, stickies, frames, placeholder tables, query windows and table cards, connect, arrange, tidy, run the doctor, and render a PNG). It can also read the diagrams you saved from the Graph tab (list_graphs,get_graph, which lists the groups and the pass-through chains and adds each table's grain, rows, bytes, last write and whether it is late, and each flow edge's transform, from what the app has cached) and create, change, rename and delete them (create_graph,update_graph,rename_graph,delete_graph; the first two takecolor_byandlens): it names tables, and the app draws the relationships it knows among them, laid out left to right. A deleted graph is kept indata/diagrams/.trash/. It can also run a canvas's query windows (run_window,run_all_windows, through the same read-only check) and keep each result in its window, and give a window a Vega-Lite chart (chart,view), so whoever opens the canvas sees the evidence and the chart without pressing Run. Mining, and measuring a relationship (profile_relationship), run only when the agent passesconfirm: true. - Lineage.
lineagewalks lineage and view dependencies several hops from one table (downstream,upstreamorboth, depth 1 to 6, at most 60 tables), whereget_relationshipsis one hop at a time.add_lineageputs the tables it reaches on a canvas as cards, connects them, and lays them out left to right by hop, as one undoable edit. - What it cannot do. Write to the workspace in any way, connect, or pick a profile or warehouse. It uses what you connected in the app, and its tools say "connect in the app first" otherwise.
- Canvas edits. An agent places nodes by structure (right of, below or inside another node) and gets the layout doctor's score and a short text summary back after every edit.
connect_knowndraws the connectors the app already knows between the table cards on a canvas (foreign keys, mined joins, manual ones), labeled with the join columns, and withinclude_lineagelineage and view dependencies too (arrows from the table that is read to the one built from it, labeledlineageorview). Every agent edit is saved to the canvas file at once and can be undone: Undo agent change in the top bar, or the agent's ownundo_canvas(the last 20 are kept indata/canvas_history/). - Live sync. The open canvas (and the open Graph diagram) checks for a newer revision every 2 seconds. With no unsaved edits it reloads in place and keeps your view. With unsaved edits you get "An agent changed this canvas", with Reload and Keep mine, and autosave waits for your choice.
Try it without a workspace: databricks-explore --demo, then uv run --no-project --with mcp scripts/mcp_interop.py --url http://127.0.0.1:8767 (from a checkout, uv run --with mcp scripts/mcp_interop.py starts its own demo server). The script drives the demo app with the official MCP Python SDK client (initialize, list tools, status, search_tables, run_sql allowed and rejected, then a canvas: create, add nodes and a query window, run it and set a chart, connect, arrange, doctor, render) and prints a pass or fail line for each. The full contract, every tool with its input and output, is contracts/mcp.md.
Development
git clone <this repository> && cd databricks-explore
uv sync # Python 3.11+, the app in editable mode and the dev group (pytest, jsonschema)
cd web && npm ci && npm run build && cd .. # once, and again after frontend changes
uv run databricks-explore --demo --no-browser # or without --demo, from source
uv run pytest -q
cd web && npm test
cd web && npx playwright install chromium && npm run e2e # browser scenarios on the demo app (web/e2e)
The build writes the UI to src/databricks_explore/web_dist/ (git-ignored), which the app serves, with THIRD-PARTY-NOTICES.txt for the npm packages bundled into it. For hot reload run the server with --debug, then in a second terminal cd web && npm run dev and open http://127.0.0.1:5173 (Vite proxies /api to the Flask server on port 8765, so use the default port).
uv build makes the wheel and sdist in dist/. If web_dist/ is missing, a hatch build hook runs npm ci and npm run build first, and stops with a clear message when Node is not installed. python scripts/check_dist.py dist checks the result. Run from a source checkout, the app finds an old data/ folder and prints a hint about --data-dir ./data.
Layout of the source: src/databricks_explore/ (the Python package: app.py, cli.py, dbx.py and the rest, mcp_server/), web/ (the React UI), tests/, contracts/ (API, MCP and canvas schema), scripts/.
Releasing
Releases go to PyPI and GitHub from the release workflow when a tag v<version> is pushed. The tag must equal __version__ in src/databricks_explore/__init__.py, the one place the version is defined. One-time setup, done by the owner:
- On GitHub, create the environment
pypi(Settings, Environments) and add a required reviewer, so every publish waits for approval. - On pypi.org, add a pending publisher for the project
databricks-explorewith this repository, the workflowrelease.ymland the environmentpypi(Account settings, Publishing). - Bump
__version__, merge, thengit tag vX.Y.Z && git push origin vX.Y.Z. Approve thepublishjob when it waits.
The CI workflow (ci.yml) runs the Python tests on Linux, Windows and macOS, the web checks, builds the wheel and sdist, and installs the wheel as a tool on all three systems to run the demo server and the MCP interop script against it.
Calls
| Need | Call |
|---|---|
| browse | catalogs.list, schemas.list, tables.list |
| columns, PK/FK, view deps | tables.get |
| lineage + producers + timestamps | GET /api/2.0/lineage-tracking/table-lineage |
| search all (optional) | system.information_schema.tables via SQL warehouse |
| canvas queries | SQL Statement Execution API on the selected warehouse |
Feedback files
logs/calls.jsonl, cache/..., diagrams/, canvases/, canvas_history/, relationships/, mcp_token, screenshots/ (all inside the data folder described under Install)
Metadata
Release files for databricks-explore 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| databricks_explore-0.12.0.tar.gz | 2.7 MB | With provenance | Details for databricks_explore-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| databricks_explore-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for databricks_explore-0.12.0-py3-none-any.whl |
Total release size: 4.6 MB
Release files / databricks_explore-0.12.0.tar.gz
| Download URL | databricks_explore-0.12.0.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70ecd23702fc74aa249daaa1213dd9ce5917f86ea9bfd8d4259c56a41dc7c683
|
|
BLAKE2b-256 checksum How to use checksums |
d4021e46ae249d2515508150c24a0333261d1ef529d13adda4e2737668f3bb3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / databricks_explore-0.12.0-py3-none-any.whl
| Download URL | databricks_explore-0.12.0-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
439b94fa2de05c8beee804749d77d12d5af966891367b27e15f02132dc651edc
|
|
BLAKE2b-256 checksum How to use checksums |
c5eb85b90f745a597cd8a64d9e162cf0b068a39364fd4b5cc2afa77973754652
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for databricks-explore 0.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for databricks_explore-0.12.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.