Skip to main content

Object browser

In ClickHouse, everything from a user to a table is an object, and grants and data dependencies connect these objects. Tracing a connection between them requires a query that joins several system tables.

The Object browser draws all objects and their connections as one graph. Selecting an object highlights everything connected to it. It answers questions such as:

  • Who can read this table?
  • What can this user reach?
  • Where does data inserted into this table go?

The Object browser is a beta feature.

Collecting a catalog​

The graph is a snapshot taken when the page opens. After changing grants, roles, or tables, click Refresh catalog to see the changes.

The graph has three bands:

BandObjects
AccessUsers, roles, and privileges
DataTables, views, materialized views, and row policies
ExternalStorage servers and remote disks

When a system table cannot be read, the page reports a coverage gap and its objects are missing from the graph. Connecting to ClickHouse lists the grants the Object browser needs.

Browsing​

ActionResult
Click a cardHighlights its connections
Hover a cardShows a summary
Click ↗ or double-click a cardOpens a focus view rooted at that object
Double-click a card in focusOpens object details

Focus shows the objects linked to the root. Clicking a card in focus makes it the new root, and the trail returns to an earlier root.

Access type selects which privileges link to tables, SELECT by default. Show filters the graph by database.

Explore​

The Explore cards start from a common question:

  • Access - Who can read this table?
  • Principals - What can this user reach?
  • Data flow - Where does this data go?
  • Storage - Which tables are stored externally?
  • Row policies - Which policies filter this table?
  • Provenance - How does a user reach a table?

Provenance​

Provenance takes a user and a table and answers, for each access type, whether the user can access the table:

AnswerMeaning
GrantedThe user has the privilege at login
ColumnsAccess is limited to some columns
Set roleAccess needs a role that is not active by default
RevokedA partial revoke removes the access
No pathNo grant gives the access
IncompleteMissing metadata prevents an answer
DiffersHosts give different answers

How it works​

The Object browser builds the graph in three steps.

  1. Read. It reads system.users, system.roles, system.role_grants, system.grants, system.row_policies, system.tables, system.storage_policies, and system.disks from every host of the cluster. Each row becomes an object or a link.
  2. Link tables. Materialized view links come from system.tables. For views and for Distributed, Buffer, S3, and URL tables, ClickHouse parses the query or engine arguments with EXPLAIN and the Object browser takes the tables and storage they name. No query reads table data.
  3. Evaluate access. Provenance computes access in TraceHouse from the collected grants, roles, and revokes, separately for each host.

ClickHouse 25.11 added EXECUTE AS <user> CHECK GRANT, which asks the server whether a user holds a privilege. The Object browser does not use it yet. It requires the IMPERSONATE privilege, which allows the connected user to run any statement as the target user, and ClickHouse Cloud does not support it.