MySQL
Core pluginmarmotdata/mysql
Discover databases and tables from MySQL instances
The MySQL plugin discovers databases and tables from MySQL instances. It captures column information, row counts, and foreign key relationships for lineage.
Required Permissions
The user needs read access to the information schema:
CREATE USER 'marmot_reader'@'%' IDENTIFIED BY 'your-password';
GRANT SELECT ON your_database.* TO 'marmot_reader'@'%';
GRANT SELECT ON information_schema.* TO 'marmot_reader'@'%';
In the UI
Point-and-click, no config file needed.
- 1 Open
Runs→Create Pipeline - 2 Pick MySQL from the plugin list.
- 3 Fill in the wizard, set a schedule, save.
With the CLI
Save a YAML config, then run marmot ingest.
name: my-mysql-pipeline
runs:
- mysql:
host: "<host>"
user: "<user>"
database: "<database>"marmot ingest -c ingest.yaml Not using plugins? Other ways to populate Marmot
Configuration
12 top-level fields.
tags multiselect Tags to apply to discovered assets
external_links object[] External links to show on all assets
name string Display name for the link
icon string Icon identifier for the link
url string URL to the external resource
filter object Filter discovered assets by name (regex)
include multiselect Include patterns for resource names (regex)
exclude multiselect Exclude patterns for resource names (regex)
host string MySQL server hostname or IP address
port int MySQL server port
3306 user string Username for authentication
password password Password for authentication
database string Database name to connect to
tls select TLS configuration (false, true, skip-verify, preferred)
false include_columns bool Whether to include column information in table metadata
true include_row_counts bool Whether to include approximate row counts
true discover_foreign_keys bool Whether to discover foreign key relationships
true Assets Emitted
Metadata fields this plugin attaches to each discovered asset.
My SQL
MySQLFieldsMySQLFields represents MySQL-specific metadata fields
host stringMySQL server hostname
port intMySQL server port
database stringDatabase name
schema stringSchema name
table_name stringObject name
object_type stringObject type (table, view)
engine stringStorage engine
collation stringTable collation
row_count intApproximate row count
data_length intData size in bytes
index_length intIndex size in bytes
created stringCreation timestamp
updated stringLast update timestamp
comment stringObject comment/description
charset stringCharacter set
version stringMySQL version
My SQL Column
MySQLColumnFieldsMySQLColumnFields represents MySQL column-specific metadata fields
column_name stringColumn name
data_type stringData type
column_type stringFull column type definition
is_nullable boolWhether null values are allowed
column_default stringDefault value
is_primary_key boolWhether column is part of primary key
is_auto_increment boolWhether column auto-increments
character_set stringCharacter set
collation stringCollation
comment stringColumn comment/description
My SQL Foreign Key
MySQLForeignKeyFieldsMySQLForeignKeyFields represents MySQL foreign key relationship fields
constraint_name stringForeign key constraint name
source_schema stringSchema of the referencing table
source_table stringName of the referencing table
source_column stringColumn in the referencing table
target_schema stringSchema of the referenced table
target_table stringName of the referenced table
target_column stringColumn in the referenced table
update_rule stringUpdate rule (CASCADE, RESTRICT, etc.)
delete_rule stringDelete rule (CASCADE, RESTRICT, etc.)