Skip to main content
GRANT SELECT ON system.parts allows a user to query the table, but the table returns only the rows that describe tables the user is allowed to see. A user without the SHOW TABLES privilege on those tables gets an empty result and no error. Grant SHOW TABLES (or any other privilege) on the tables whose parts the user needs to see.

Example

As an administrator, create a table and a user that can read system.parts:
Connect as monitoring and run:
The query succeeds and returns no rows. Now, as the administrator, add the missing privilege:
The same query, run as monitoring, now returns the part:
SHOW TABLES reveals metadata only. Reading db1.events itself is still refused with ACCESS_DENIED until you grant SELECT on it.

Why this happens

system.parts exposes the names of databases and tables, so it shows a part only if the current user holds the SHOW TABLES privilege on the table the part belongs to. The check is made for every table: a user can see the parts of some tables and not of others. You can grant SHOW TABLES on one table, on a database, or on everything:
A user also has the SHOW privileges on an object implicitly when it has any other privilege on it. For example, a user with SELECT on db1.events sees the parts of db1.events without a separate SHOW TABLES grant.

Other system tables that hide rows

The same filtering applies to other system tables that describe databases, tables, columns and dictionaries: SHOW COLUMNS implies SHOW TABLES, and SHOW TABLES or SHOW DICTIONARIES implies SHOW DATABASES. To make all metadata visible to a monitoring user, grant the whole group:
system.databases, system.tables and system.columns are readable by every user without a SELECT grant, and they are filtered in the same way.

How to tell a missing SELECT grant from hidden rows

With the default select_from_system_db_requires_grant setting, a missing SELECT grant on a system table produces an error, not an empty result:
If the query succeeds but rows are missing, check the SHOW privileges of the user: