---
name: "apache-hive-metastore-catalog"
description: "Manage unified table metadata, partition schemas, and storage locations across compute engines."
metadata:
  author: "Apache Software Foundation"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure hive metastore postgres"
  - "run msck repair table"
  - "register external table hive"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Apache Hive Metastore (HMS) Central Data Catalog

Administers Apache Hive Metastore: configuring standalone HMS with PostgreSQL backend, registering external tables, synchronizing partition metadata (MSCK REPAIR TABLE), and securing metadata access.

## When to Invoke
Invoke this skill whenever you need to:
- configure hive metastore postgres
- run msck repair table
- register external table hive

## Execution SOP & Rules
1. Configure hive-site.xml with javax.jdo.option.ConnectionURL targeting the PostgreSQL metadata DB.
2. Initialize schema: schematool -dbType postgres -initSchema.
3. Register external table: CREATE EXTERNAL TABLE logs (...) STORED AS PARQUET LOCATION 's3://bucket/logs/'.
4. Sync newly created partitions: MSCK REPAIR TABLE logs; or use automated partition discovery.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
