Skip to main content
Version: Preview

Cassandra

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 Cassandra plugin discovers keyspaces, tables and materialized views from Apache Cassandra clusters. It reads the system_schema tables over CQL with the pure-Go gocql driver, so it works with Cassandra 3.0 and later.

Each keyspace becomes a Keyspace asset linked to its tables and views by CONTAINS edges, and each materialized view is linked to its base table by a VIEW_OF edge. Tables and views are named keyspace.table, the same identity the OpenMetadata plugin projects for a Cassandra service, so both routes land on one asset.

Columns keep the CQL type exactly as Cassandra stores it (map<text, int>, frozen<address>) and record whether they are part of the partition key, a clustering column, a static column or a regular one. A materialized view carries its definition as a CQL query rebuilt from the base table, selected columns and filter.

Statistics

Column and index counts are reported per table. A row count is not: Cassandra keeps no row estimate and COUNT(*) is a full cluster scan.

Known Gaps

DataStax Astra secure connect bundles are not supported. Connect with hosts and ssl instead.

Example Configuration


hosts:
- "cassandra-1.internal:9042"
- "cassandra-2.internal"
port: 9042
username: "marmot_reader"
password: "cassandra_secure_pass"
datacenter: "dc1"
keyspaces:
- "shop"
include_columns: true
include_views: true
include_indexes: true
include_statistics: true
filter:
include:
- "^shop.*"
exclude:
- ".*_tmp$"
tags:
- "cassandra"
- "shop"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
connect_timeout_secondsintfalseSeconds to wait for a connection
datacenterstringfalseLocal datacenter; only its nodes are queried when set
exclude_system_keyspacesboolfalseWhether to skip Cassandra's own keyspaces (system, system_schema, system_auth, ...)
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
hosts[]stringtrueContact points, as host or host:port
include_columnsboolfalseWhether to include column information in table metadata
include_indexesboolfalseWhether to include secondary index information
include_statisticsboolfalseWhether to include column and index counts
include_viewsboolfalseWhether to include materialized views
keyspaces[]stringfalseKeyspaces to discover; all non-system keyspaces when empty
passwordstringfalsePassword for password authentication
portintfalsePort for contact points given without one
sslboolfalseConnect over TLS
ssl_ca_certstringfalsePath to the CA certificate that signed the server certificate
ssl_skip_verifyboolfalseSkip verification of the server certificate
tagsTagsConfigfalseTags to apply to discovered assets
usernamestringfalseUsername for password authentication

Available Metadata

The following metadata fields are available:

FieldTypeDescription
base_tablestringTable a materialized view is built from
bloom_filter_fp_chancefloat64Bloom filter false positive chance
cachingmap[string]stringKey and row cache settings
cassandra_versionstringCassandra release version of the node queried
cluster_namestringCluster name
clustering_columns[]stringClustering columns in key order
clustering_ordermap[string]stringSort direction (asc, desc) per clustering column
column_namestringColumn name
commentstringTable comment
compaction_classstringCompaction strategy
compression_classstringCompressor
data_typestringCQL type as stored, for example map<text, int> or frozen<address>
datacenterstringDatacenter of the node queried
default_ttlintDefault time to live in seconds, 0 for none
durable_writesboolWhether writes go through the commit log
flags[]stringTable flags (compound, counter, dense, super)
gc_grace_secondsintSeconds tombstones are kept before collection
idstringTable id
include_all_columnsboolWhether a materialized view selects every base table column
index_countintNumber of secondary indexes
indexes[]stringSecondary index names
is_counterboolWhether the table holds counter columns
is_nullableboolWhether the column can be null (false for key columns)
is_primary_keyboolWhether the column is part of the partition or clustering key
keyspacestringKeyspace name
kindstringColumn kind (partition_key, clustering, regular, static)
object_typestringObject type (table, view)
partition_key[]stringPartition key columns in key order
positionintIndex within the partition or clustering key, -1 otherwise
replication_classstringReplication strategy (SimpleStrategy, NetworkTopologyStrategy)
replication_factorintReplication factor when one applies to the whole keyspace
replication_factorsmap[string]intReplication factor per datacenter
table_countintNumber of tables in the keyspace
table_namestringTable or view name
user_types[]stringUser-defined types declared in the keyspace
view_countintNumber of materialized views in the keyspace
where_clausestringFilter a materialized view applies to its base table