system.documentation
Description
Collects the embedded documentation of the uniform components of the system into a single table. Every row corresponds to one entity (a function, a table engine, a data type, and so on) and contains the reference documentation of that entity rendered as Markdown — the same content that is published on the website and exposed by the per-kind system.* tables.
The description is assembled from the structured parts of the embedded documentation (description, syntax, arguments, examples, and so on), so a single column holds the complete documentation of an entity. Aliases are rendered as a short reference to the canonical entity, e.g. Alias of `trunc`.
This table, in a certain way, collects the information available in the per-kind documentation tables (system.functions, system.table_engines, system.data_type_families, and others). It is meant, in particular, to back an interactive help command in the client, but is useful on its own.
The following kinds of entities are collected (the value of the type column is shown in parentheses):
- Functions (
Function) - Aggregate functions (
Aggregate Function) - Table functions (
Table Function) - Table engines (
Table Engine) - Database engines (
Database Engine) - Data types (
Data Type) - Dictionary layouts (
Dictionary Layout) - Dictionary sources (
Dictionary Source) - Aggregate function combinators (
Aggregate Function Combinator) - Data skipping index types (
Data Skipping Index) - Disk types (
Disk Type) - Settings (
Setting) - MergeTree settings (
MergeTree Setting) - Server settings (
Server Setting) - Formats (
Format) - Compression codecs (
Compression Codec) - Profile events (
Profile Event) - Current metrics (
Current Metric) - Asynchronous metrics (
Asynchronous Metric) - System tables (
System Table)
For settings (of any kind), the documentation is the setting's description, together with its type and default value; obsolete settings are not exposed. For system tables, the documentation is the table comment together with the list of its columns (the name, type and description of each).
The source column holds the path of the source file where the entity's documentation is defined, relative to the repository root. For most entities it is captured automatically at the place where the documentation object is constructed (the registration site of the component); for the kinds that are documented in a single source file each (such as settings, profile events and current metrics), it is that file.
Columns
name(String) — The name of the entity, e.g.domainWithoutWWWorMergeTree.type(Enum8('Function' = 1, 'Aggregate Function' = 2, 'Table Function' = 3, 'Table Engine' = 4, 'Database Engine' = 5, 'Data Type' = 6, 'Dictionary Layout' = 7, 'Dictionary Source' = 8, 'Aggregate Function Combinator' = 9, 'Data Skipping Index' = 10, 'Disk Type' = 11, 'Setting' = 12, 'MergeTree Setting' = 13, 'Server Setting' = 14, 'Format' = 15, 'Compression Codec' = 16, 'Profile Event' = 17, 'Current Metric' = 18, 'Asynchronous Metric' = 19, 'System Table' = 20)) — The kind of the entity, e.g.FunctionorTable Engine.description(String) — The reference documentation of the entity rendered as Markdown, assembled from the embedded documentation (the same content as published on the website), including syntax, examples and other structured parts, if any.source(String) — The path to the source file where the entity's documentation is defined, relative to the repository root. Empty if the source location is unknown.
Example
Read the documentation of a particular entity:
The same name can refer to several kinds of entities (for example, there is both a file table function and a file dictionary source), so it is convenient to look a name up across all kinds:
Count the documented entities of each kind:
See also
system.functions— Regular and aggregate functions.system.table_functions— Table functions.system.table_engines— Table engines.system.database_engines— Database engines.system.data_type_families— Data types.system.disk_types— Disk types.system.settings— Settings.system.merge_tree_settings— MergeTree settings.system.server_settings— Server settings.system.formats— Formats.