Skip to main content
Version: Preview

CockroachDB

Experimental
Creates:
AssetsLineage

Configure in the UI

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

View Guide

The CockroachDB plugin discovers databases, tables, views and materialized views from a CockroachDB cluster. It captures columns (including computed column expressions and comments), row and column counts, table sizes, partitioning, foreign key relationships and, for each view, a lineage edge from every table it reads to the view.

One cluster holds many databases, so tables and views are named database.schema.table. Every database except system is discovered by default; set database to discover one, or exclude_databases to skip more.

Hidden columns CockroachDB adds on its own (the rowid of a table without a primary key and the shard column of a hash-sharded index) are left out.

Connection

The plugin speaks the PostgreSQL wire protocol over the SQL port (26257 by default). Set ssl_mode to verify-full with ssl_root_cert for secure clusters, and ssl_cert plus ssl_key for certificate authentication. Leave password empty on insecure clusters.

Example Configuration


host: "crdb-prod.internal"
port: 26257
user: "marmot_reader"
password: "secure_password_123"
ssl_mode: "verify-full"
ssl_root_cert: "/etc/marmot/certs/ca.crt"
exclude_databases:
- "system"
- "defaultdb"
tags:
- "cockroachdb"
- "production"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
databasestringfalseDiscover only this database. Leave empty to discover every database
discover_foreign_keysboolfalseWhether to discover foreign key relationships
exclude_databases[]stringfalseDatabases to skip when discovering every database (default: system)
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
hoststringtrueCockroachDB node hostname or IP address
include_columnsboolfalseWhether to include column information in table metadata
include_statisticsboolfalseWhether to include row counts, column counts and table sizes
include_viewsboolfalseWhether to discover views and materialized views
passwordstringfalsePassword for the SQL user. Leave empty on insecure clusters or with certificate authentication
portintfalseSQL port (default: 26257)
ssl_certstringfalsePath to the client certificate, for certificate authentication
ssl_keystringfalsePath to the client certificate key
ssl_modestringfalseSSL mode (disable, require, verify-ca, verify-full)
ssl_root_certstringfalsePath to the CA certificate that signed the node certificates
tagsTagsConfigfalseTags to apply to discovered assets
userstringtrueSQL user

Available Metadata

The following metadata fields are available:

FieldTypeDescription
column_namestringColumn name
commentstringObject comment
data_typestringCockroachDB data type
databasestringDatabase name
default_expressionstringDefault value expression
descriptionstringColumn comment
estimated_row_countint64Row count estimated from the optimizer's table statistics
generation_expressionstringExpression of a computed column
hoststringCockroachDB node hostname
is_nullableboolWhether null values are allowed
is_primary_keyboolWhether the column is part of the primary key
materializedboolWhether a view is materialized
object_typestringObject type (table, view, materialized_view, foreign_table)
ownerstringObject owner
partition_columnsstringColumns the table is partitioned on, comma separated
partitionedboolWhether the table's primary index is partitioned
portintSQL port
schemastringSchema name
server_versionstringCockroachDB version string
table_namestringTable or view name