Skip to main content

PostgreSQL

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 PostgreSQL plugin discovers databases, schemas, and tables from PostgreSQL instances. It captures column information, table metrics, and foreign key relationships for lineage.

Required Permissions

The user needs read access to the information schema:

GRANT CONNECT ON DATABASE your_db TO marmot_reader;
GRANT USAGE ON SCHEMA public TO marmot_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO marmot_reader;

Example Configuration


host: "prod-postgres.company.com"
port: 5432
user: "marmot_reader"
password: "secure_password_123"
ssl_mode: "require"
tags:
- "postgres"
- "production"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
database_filterplugin.FilterfalseFilter configuration for databases
discover_foreign_keysboolfalseWhether to discover foreign key relationships
enable_metricsboolfalseWhether to include table metrics
exclude_system_schemasboolfalseWhether to exclude system schemas (pg_*)
external_links[]ExternalLinkfalseExternal links to show on all assets
hoststringfalsePostgreSQL server hostname or IP address
include_columnsboolfalseWhether to include column information in table metadata
include_databasesboolfalseWhether to discover databases
passwordstringfalsePassword for authentication
portintfalsePostgreSQL server port
schema_filterplugin.FilterfalseFilter configuration for schemas
ssl_modestringfalseSSL mode (disable, require, verify-ca, verify-full)
table_filterplugin.FilterfalseFilter configuration for tables
tagsTagsConfigfalseTags to apply to discovered assets
userstringfalseUsername for authentication

Available Metadata

The following metadata fields are available:

FieldTypeDescription
allow_connectionsboolWhether connections to this database are allowed
collatestringDatabase collation
column_defaultstringDefault value expression
column_namestringColumn name
commentstringColumn comment/description
commentstringObject comment/description
connection_limitintMaximum allowed connections
constraint_namestringForeign key constraint name
createdstringCreation timestamp
ctypestringDatabase character classification
data_typestringData type
databasestringDatabase name
encodingstringDatabase encoding
hoststringPostgreSQL server hostname
is_nullableboolWhether null values are allowed
is_primary_keyboolWhether column is part of primary key
is_templateboolWhether database is a template
object_typestringObject type (table, view, materialized_view)
ownerstringObject owner
portintPostgreSQL server port
row_countint64Approximate row count
schemastringSchema name
sizeint64Object size in bytes
source_columnstringColumn in the referencing table
source_schemastringSchema of the referencing table
source_tablestringName of the referencing table
table_namestringObject name
target_columnstringColumn in the referenced table
target_schemastringSchema of the referenced table
target_tablestringName of the referenced table