Skip to main content

ClickHouse

Experimental
Creates:
Assets

Configure in the UI

This plugin can be configured directly in the Marmot UI with a step-by-step wizard.

View Guide

The ClickHouse plugin discovers databases, tables, and views from ClickHouse instances. It extracts schema information, column details, and table metrics like row counts and storage sizes.

Connection Examples

Required Permissions

The user needs read access to system tables:

GRANT SELECT ON system.databases TO marmot_user;
GRANT SELECT ON system.tables TO marmot_user;
GRANT SELECT ON system.columns TO marmot_user;

For read-only discovery of all databases:

GRANT SHOW DATABASES ON *.* TO marmot_user;
GRANT SHOW TABLES ON *.* TO marmot_user;
GRANT SHOW COLUMNS ON *.* TO marmot_user;

Example Configuration


host: "clickhouse.company.com"
port: 9000
user: "default"
password: "${CLICKHOUSE_PASSWORD}"
database: "default"
secure: false
include_databases: true
include_columns: true
enable_metrics: true
exclude_system_tables: true
database_filter:
include:
- "^analytics.*"
exclude:
- ".*_temp$"
tags:
- "clickhouse"
- "analytics"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
databasestringfalseDefault database to connect to
database_filterplugin.FilterfalseFilter configuration for databases
enable_metricsboolfalseWhether to include table metrics (row counts, sizes)
exclude_system_tablesboolfalseWhether to exclude system tables
external_links[]ExternalLinkfalseExternal links to show on all assets
hoststringfalseClickHouse server hostname or IP address
include_columnsboolfalseWhether to include column information in table metadata
include_databasesboolfalseWhether to discover databases
passwordstringfalsePassword for authentication
portintfalseClickHouse native protocol port
secureboolfalseUse TLS/SSL connection
table_filterplugin.FilterfalseFilter configuration for tables
tagsTagsConfigfalseTags to apply to discovered assets
userstringfalseUsername for authentication

Available Metadata

The following metadata fields are available:

FieldTypeDescription
column_namestringColumn name
commentstringDatabase comment/description
commentstringColumn comment/description
commentstringTable comment/description
data_typestringColumn data type
databasestringDatabase name
databasestringParent database name
default_expressionstringDefault value expression
default_kindstringDefault value kind (DEFAULT, MATERIALIZED, ALIAS)
enginestringDatabase engine type
enginestringTable engine (MergeTree, ReplacingMergeTree, etc.)
is_primary_keyboolWhether column is part of primary key
is_sorting_keyboolWhether column is part of sorting key
row_countint64Estimated row count
size_bytesint64Table size in bytes
table_namestringTable name