marmotdata/hive
Discover databases, tables and views from Apache Hive through HiveServer2
The Hive plugin discovers databases, tables, views and materialized views from Apache Hive through HiveServer2. It captures columns with their Hive types and comments, partition and bucket layout, storage formats, table statistics, view queries and foreign key constraints for lineage.
It speaks the HiveServer2 Thrift protocol with the pure-Go github.com/beltran/gohive driver over the binary or HTTP transport, with NONE, NOSASL, LDAP or KERBEROS authentication and optional TLS.
Required Permissions
The user needs SELECT on the databases to discover. Discovery runs SHOW DATABASES, DESCRIBE DATABASE EXTENDED, SHOW TABLES, SHOW VIEWS, SHOW MATERIALIZED VIEWS, DESCRIBE FORMATTED, SHOW PARTITIONS and, with include_ddl, SHOW CREATE TABLE. Sample data previews run SELECT * ... LIMIT 20.
Notes
- Row counts and sizes come from the metastore statistics (
numRows,totalSize), which are as fresh as the lastANALYZE TABLEor stats-collecting write. - Kerberos needs a build with the driver's
kerberostag and the GSSAPI C library:go build -tags kerberos .. The published binaries are built without it and report an error whenauth: KERBEROSis used. - Hive 4 creates non-ACID tables as external tables (
TRANSLATED_TO_EXTERNAL), soobject_typereports what Hive itself reports.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Apache Hive 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 RequiredHiveServer2 hostname or IP address
portNumberHiveServer2 port
authOne ofAuthentication mechanism (NONE, NOSASL, LDAP, KERBEROS)
usernameText RequiredUsername (hive when empty)
passwordSecret RequiredPassword, required for LDAP
kerberos_service_nameTextService part of the HiveServer2 Kerberos principal
transportOne ofThrift transport (binary or http)
http_pathTextEndpoint path for the http transport
sslYes or noConnect over TLS
ssl_skip_verifyYes or noSkip TLS certificate verification
databasesList of textDatabases to discover (all when empty)
exclude_databasesList of textDatabases to skip
include_columnsYes or noInclude column information
include_viewsYes or noInclude views and materialized views
include_statisticsYes or noInclude row counts and sizes from table statistics
include_partitionsYes or noCount the partitions of partitioned tables
include_ddlYes or noStore the SHOW CREATE TABLE output in metadata
Assets emitted
Metadata this plugin attaches to each discovered asset.
Database
The metadata fields the Hive plugin emits for database assets.
Table
The metadata fields the Hive plugin emits for table and view assets.
Column
The per-column fields embedded in an asset's schema.