Skip to main content
Version: Preview

MariaDB

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 MariaDB plugin discovers one database and its tables, views and sequences from a MariaDB server. It reads column information (including invisible and generated columns), row and size statistics from information_schema, foreign key relationships and view lineage. A view is fed by the tables it reads, so VIEW_OF edges run from each base table (or view) into the view.

The database is a Database asset linked to its tables, views and sequences by CONTAINS lineage. Table names are bare (mrn://table/mariadb/orders), the same identity the OpenMetadata and Trino plugins use for MariaDB tables, so all three land on one asset.

Required Permissions

The user needs read access to the database. SHOW VIEW is needed to read view definitions:

CREATE USER 'marmot_reader'@'%' IDENTIFIED BY 'your-password';
GRANT SELECT, SHOW VIEW ON your_database.* TO 'marmot_reader'@'%';

Row counts come from information_schema.TABLES, which InnoDB refreshes on ANALYZE TABLE. They are estimates, not exact counts.

Example Configuration


host: "mariadb-prod.internal"
port: 3306
user: "marmot_reader"
password: "mariadb_secure_pass"
database: "shop"
tls: "true"
include_views: true
include_sequences: true
tags:
- "mariadb"
- "shop"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
databasestringtrueDatabase to discover
discover_foreign_keysboolfalseWhether to discover foreign key relationships
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
hoststringtrueMariaDB server hostname or IP address
include_columnsboolfalseWhether to include column information in table and view schemas
include_row_countsboolfalseWhether to include approximate row counts in table metadata
include_sequencesboolfalseWhether to discover sequences
include_statisticsboolfalseWhether to emit row count, size and column count statistics
include_viewsboolfalseWhether to discover views
passwordstringfalsePassword for authentication
portintfalseMariaDB server 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
auto_incrementint64Next auto increment value
cache_sizeint64Number of values cached per fetch
character_setstringDefault character set of the database, or of a column
check_optionstringWITH CHECK OPTION setting (NONE, LOCAL, CASCADED)
collationstringCollation of the database, table or column
column_namestringColumn name
commentstringTable comment
createdstringCreation timestamp
cycle_optionboolWhether the sequence restarts after reaching its limit
data_lengthint64Data size in bytes
data_typestringFull column type, for example varchar(255) or int(11)
databasestringDatabase name
default_expressionstringDefault value or expression
definerstringAccount that defined the view
descriptionstringColumn comment
enginestringStorage engine
hoststringMariaDB server hostname
incrementint64Step between values
index_lengthint64Index size in bytes
is_auto_incrementboolWhether the column auto-increments
is_generatedboolWhether the column is computed from an expression
is_invisibleboolWhether the column is hidden from SELECT *
is_nullableboolWhether null values are allowed
is_primary_keyboolWhether the column is part of the primary key
is_updatableboolWhether the view accepts writes
maximum_valueint64Largest value the sequence produces
minimum_valueint64Smallest value the sequence produces
object_typestringObject type (table, view, sequence)
portintMariaDB server port
row_countint64Approximate row count
schemastringSchema name (same as the database in MariaDB)
security_typestringSQL SECURITY setting (DEFINER, INVOKER)
server_versionstringMariaDB server version
start_valueint64Value the sequence started at
system_versionedboolWhether the table keeps row history (WITH SYSTEM VERSIONING)
table_namestringObject name
temporaryboolWhether the table is temporary (only when the server exposes it)
updatedstringLast update timestamp