Skip to main content
Version: Preview

StarRocks

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 StarRocks plugin discovers databases, tables, views and asynchronous materialized views from StarRocks clusters. StarRocks speaks the MySQL wire protocol, so the plugin connects to a frontend (FE) node on its query port, port 9030 by default.

Tables carry the details that make a StarRocks table different from a plain SQL table: the key model (DUPLICATE, AGGREGATE, UNIQUE or PRIMARY), the aggregate function of each value column, the partitioning strategy, the bucketing strategy and the sort key.

Catalogs

Discovery runs against one catalog per configuration block. catalog defaults to default_catalog, the cluster's own storage. Naming an external catalog switches the session to it and discovers the tables it exposes. Add a second run to cover a second catalog.

Lineage

A Database asset contains every table and view in it. A view points back at the tables its query reads, resolved against the objects discovered in the same run, and an asynchronous materialized view points back at the base tables StarRocks itself tracks for refreshes. Tables that declare a foreign_key_constraints property point at the tables they reference.

Row Counts

Row counts and sizes come from information_schema.tables, which StarRocks fills in from backend tablet reports. A cluster that has not reported yet returns 0 for both. Set include_statistics: false to leave them out.

Example Configuration


host: "starrocks-fe.internal"
port: 9030
user: "marmot_reader"
password: "${STARROCKS_PASSWORD}"
catalog: "default_catalog"
databases:
- "shop"
- "analytics"
include_columns: true
include_views: true
include_materialized_views: true
include_statistics: true
tags:
- "starrocks"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
catalogstringfalseCatalog to discover; an external catalog name switches discovery to it
databases[]stringfalseDatabases to discover; all when empty
exclude_databases[]stringfalseDatabases to skip
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
hoststringtrueFrontend (FE) hostname or IP address
include_columnsboolfalseWhether to include column information
include_materialized_viewsboolfalseWhether to discover asynchronous materialized views
include_statisticsboolfalseWhether to include row counts, sizes and column counts
include_viewsboolfalseWhether to discover views
passwordstringfalsePassword for authentication
portintfalseFrontend MySQL protocol port
tagsTagsConfigfalseTags to apply to discovered assets
tlsstringfalseTLS mode (false, true, skip-verify, preferred)
userstringtrueUsername for authentication

Available Metadata

The following metadata fields are available:

FieldTypeDescription
aggregation_typestringAggregate function of a value column in an AGGREGATE KEY table
bucketsintNumber of buckets, when fixed
catalogstringCatalog name
catalog_typestringCatalog type (Internal, Hive, Iceberg, ...)
column_namestringColumn name
commentstringTable comment
createdstringCreation timestamp
data_typestringColumn type as printed by SHOW FULL COLUMNS
databasestringDatabase name
ddlstringCREATE statement as printed by SHOW CREATE
default_expressionstringDefault value
descriptionstringColumn comment
distributionstringBucketing strategy (HASH, RANDOM)
distribution_columnsstringComma-separated hash distribution columns
enginestringStorage engine as reported by information_schema
external_enginestringEngine of an external table (MySQL, Hive, JDBC, ...)
hoststringFrontend hostname
is_activeboolWhether the materialized view is active
is_auto_incrementboolWhether the column is AUTO_INCREMENT
is_keyboolWhether StarRocks reports the column as a key column
is_nullableboolWhether null values are allowed
is_primary_keyboolWhether the column is in the PRIMARY KEY or UNIQUE KEY clause
is_sorting_keyboolWhether the column is in the DUPLICATE KEY, AGGREGATE KEY or ORDER BY clause
key_columnsstringComma-separated key columns
key_modelstringTable key model (DUPLICATE, AGGREGATE, UNIQUE, PRIMARY)
last_refresh_start_timestringStart time of the last materialized view refresh
last_refresh_statestringState of the last materialized view refresh
materializedboolWhether a view is an asynchronous materialized view
object_typestringObject type (table, view, materialized_view, external_table)
order_bystringComma-separated sort key columns from ORDER BY
partition_columnsstringComma-separated partition columns
partition_countintNumber of partitions
partition_expressionstringPartition expression for expression partitioning
partition_typestringPartitioning strategy (RANGE, LIST, EXPRESSION)
portintFrontend MySQL protocol port
refresh_typestringMaterialized view refresh type (ASYNC, MANUAL)
replication_numintReplica count from table properties
starrocks_versionstringStarRocks version reported by the frontend
storage_volumestringStorage volume from table properties
table_countintNumber of tables discovered in the database
table_namestringBare table or view name
task_namestringRefresh task name of the materialized view
updatedstringLast data change timestamp
view_countintNumber of views and materialized views discovered in the database