Oracle Database
Official · maintained by Marmotmarmotdata/oracle Discover schemas, tables, views, materialized views and stored procedures from Oracle databases
The Oracle plugin discovers schemas, tables, views, materialized views and stored procedures from Oracle databases. It captures column information, primary and foreign keys, optimizer statistics and view lineage.
It uses the pure-Go github.com/sijms/go-ora/v2 driver, so it needs no Oracle Instant Client.
Naming
Oracle users treat a schema as the database, so each schema becomes a Database asset named after the schema (HR). Tables, views and procedures are named SCHEMA.OBJECT (HR.EMPLOYEES), the same shape the OpenMetadata and Trino plugins use for Oracle, so the three land on one asset. Identifiers keep the case Oracle stores them in, which is upper case unless they were created quoted.
Sequences are not discovered.
Lineage
CONTAINSfrom each schema'sDatabaseasset to its tables, views and procedures.FOREIGN_KEYfrom the referencing table to the referenced table, including references into another discovered schema.VIEW_OFfrom each base table to the view or materialized view that reads it, extracted from the view's SQL.
Required Permissions
The user needs to read the data dictionary and the objects it should catalogue:
CREATE USER marmot_reader IDENTIFIED BY "your-password";
GRANT CREATE SESSION TO marmot_reader;
GRANT SELECT ANY TABLE TO marmot_reader;
ALL_* dictionary views only list objects the user can access. Procedures, functions and packages need EXECUTE ANY PROCEDURE (or an EXECUTE grant per object) to show up. Row counts and sizes come from optimizer statistics, so run DBMS_STATS.GATHER_SCHEMA_STATS for schemas that have never been analyzed.
With use_dba_views: true the plugin reads DBA_* views instead, which list every object regardless of grants. That needs SELECT ANY DICTIONARY (or SELECT_CATALOG_ROLE):
GRANT SELECT ANY DICTIONARY TO marmot_reader;
Sample data previews read the table directly, so they need SELECT on it.
In the UI
Point-and-click, no config file needed.
- 1 Open Runs Create pipeline
- 2 Pick Oracle Database 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-oracle-pipeline
runs:
- oracle:
host: "<host>"
user: "<user>"
password: "***"$ marmot ingest -c ingest.yamlNot using plugins? Other ways to populate Marmot
Configuration
21 top-level fields. * marks required 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 Oracle listener hostname or IP address
port int Oracle listener port
- default
- 1521
user string Username for authentication
password password Password for authentication
service_name string Service name to connect to, for example FREEPDB1 (required unless sid is set)
sid string System identifier to connect to instead of a service name
schemas multiselect Schemas to discover (every schema not maintained by Oracle when empty)
exclude_schemas multiselect Schemas to skip
- default
- ["SYS","SYSTEM","CTXSYS","DBSNMP","OUTLN","XDB","MDSYS","ORDSYS","OLAPSYS","WMSYS","APEX_PUBLIC_USER","AUDSYS","DVSYS","GSMADMIN_INTERNAL","LBACSYS","OJVMSYS","DBSFWUSER","GGSYS","APPQOSSYS","REMOTE_SCHEDULER_AGENT","SYS$UMF","DIP","ORACLE_OCM","ANONYMOUS","XS$NULL","FLOWS_FILES"]
use_dba_views bool Read DBA_* dictionary views instead of ALL_* (needs SELECT ANY DICTIONARY)
- default
- false
include_columns bool Whether to include column information in table metadata
- default
- true
include_views bool Whether to discover views
- default
- true
include_materialized_views bool Whether to discover materialized views
- default
- true
include_procedures bool Whether to discover procedures, functions and packages
- default
- true
discover_foreign_keys bool Whether to discover foreign key relationships
- default
- true
include_statistics bool Whether to include row counts and sizes from optimizer statistics
- default
- true
ssl bool Connect over TCPS (TLS)
- default
- false
ssl_verify bool Verify the server certificate when ssl is enabled
- default
- true
wallet_path string Path to an Oracle wallet directory (TCPS certificates or wallet authentication)
Assets emitted
Metadata this plugin attaches to each discovered asset.
Database
OracleDatabaseFieldsThe metadata fields the Oracle plugin emits for the Database asset created per schema. Oracle users treat a schema as the database, so the asset is named after the schema.
host stringOracle listener hostname
port intOracle listener port
schema stringSchema (user) that owns the objects
service_name stringService name the plugin connected to
sid stringSID the plugin connected to, when configured
db_name stringDatabase name (USERENV DB_NAME)
container stringContainer or pluggable database name (USERENV CON_NAME)
oracle_version stringOracle version banner
created stringWhen the schema user was created
table_count intNumber of tables in the schema
view_count intNumber of views in the schema
materialized_view_count intNumber of materialized views in the schema
Table
OracleTableFieldsThe metadata fields emitted for table, view and materialized view assets.
host stringOracle listener hostname
port intOracle listener port
schema stringSchema that owns the object
table_name stringObject name as stored by Oracle
object_type stringObject type (table, view, materialized_view)
tablespace stringTablespace holding the table
partitioned boolWhether the table is partitioned
temporary boolWhether the table is a global temporary table
iot boolWhether the table is index-organized
compression stringTable compression setting
num_rows intRow count from optimizer statistics
last_analyzed stringWhen optimizer statistics were last gathered
comment stringTable or view comment
text_length intLength of the view definition
materialized boolWhether the view is materialized
refresh_mode stringMaterialized view refresh mode (DEMAND, COMMIT)
refresh_method stringMaterialized view refresh method (COMPLETE, FAST, FORCE)
build_mode stringMaterialized view build mode (IMMEDIATE, DEFERRED)
last_refresh stringWhen the materialized view was last refreshed
staleness stringMaterialized view staleness (FRESH, STALE, NEEDS_COMPILE)
Column
OracleColumnFieldsThe per-column fields embedded in an asset's schema.
column_name stringColumn name
data_type stringData type as DESCRIBE shows it, for example NUMBER(10,2) or VARCHAR2(50 CHAR)
is_nullable boolWhether null values are allowed
is_primary_key boolWhether the column is part of the primary key
description stringColumn comment
default_expression stringDefault value expression
is_virtual boolWhether the column is computed from an expression
is_identity boolWhether the column is an identity column
Function
OracleFunctionFieldsThe metadata fields emitted for procedure, function and package assets.
host stringOracle listener hostname
port intOracle listener port
schema stringSchema that owns the object
object_name stringObject name as stored by Oracle
object_type stringObject type (procedure, function, package)
status stringCompilation status (VALID, INVALID)
created stringWhen the object was created
last_ddl_time stringWhen the object was last changed