marmotdata/postgresql
Discover databases, schemas, and tables from PostgreSQL instances
The PostgreSQL plugin discovers databases, schemas, and tables from PostgreSQL instances. It captures column information, table metrics, and foreign key relationships for lineage.
Tables and views are identified in their MRN by database.schema.object, for example mrn://asset/table/postgresql/shop.public.orders. Set zone to a short name such as prod-eu when you run two servers of the same kind, and it becomes part of every MRN. The name is one you choose, not a cloud availability zone.
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;
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick PostgreSQL from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
hostText RequiredPostgreSQL server hostname or IP address
portNumberPostgreSQL server port
userText RequiredUsername for authentication
passwordSecretPassword for authentication
ssl_modeOne ofSSL mode (disable, require, verify-ca, verify-full)
include_databasesYes or noWhether to discover databases
include_columnsYes or noWhether to include column information in table metadata
enable_metricsYes or noWhether to include table metrics
discover_foreign_keysYes or noWhether to discover foreign key relationships
exclude_system_schemasYes or noWhether to exclude system schemas (pg_*)
query_databaseTextDatabase that data queries run against when this source answers queries
Assets emitted
Metadata this plugin attaches to each discovered asset.
Postgres
PostgreSQL-specific metadata fields
Postgres Column
PostgreSQL column-specific metadata fields
Postgres Foreign Key
PostgreSQL foreign key relationship fields