Skip to main content
This feature requires StarTree Cloud 0.18.0 or later. Contact StarTree support to enable the Hive Metastore catalog for your environment.
The Hive Metastore (HMS) catalog lets an External Table read a table registered in HMS. StarTree connects straight to the HMS Thrift endpoint (catalogType=hive), with no REST proxy in between. It reads Iceberg tables through their snapshots, and native Hive Parquet tables through their registered partitions and files. This page onboards a table with the StarTree controller REST APIs, and it’s the full reference for Hive Metastore: requirements, every option, limits and errors. Prefer a single statement? Onboarding via SQL DDL creates the same table with CREATE TABLE ... WITH; each option’s SQL DDL name is in the configuration reference below.

What changes

Before StarTree Cloud 0.18.0, catalog-backed External Tables needed an Iceberg REST catalog (REST, Unity, Glue, S3 Tables). Now you can point at HMS directly:
  • Set catalogType to hive and give a thrift://host:port URI in catalog.hive.metastoreUri.
  • Authenticate to HMS with Kerberos, a delegation token, TLS, or mutual TLS through the catalog.hive.auth.metastore.* keys. REST auth options are rejected.
  • Read native Hive Parquet tables, which have no Iceberg metadata.
  • The sync always runs on the controller. The periodic watcher (enabled = true) is not supported.
You don’t say whether a table is Iceberg or native Parquet. StarTree reads it from HMS, and the format decides how the table syncs.

Requirements

  • StarTree Cloud 0.18.0 or later, with the Hive Metastore catalog enabled by StarTree support.
  • An HMS binary Thrift endpoint, written as thrift://host:port. Use thrift:// even when TLS is on. Separate several endpoints with commas. HTTP endpoints are not supported.
  • Tested HMS releases: Hive 2.3.9, 3.1.3, 4.0.1, 4.1.0 and 4.2.1. Stock Hive 2.3.9 can’t combine Kerberos and TLS on one listener; the other releases support it with saslQop set to auth.
  • Network access from your StarTree environment to HMS. StarTree also needs read access to the source data.
  • For S3: read access to the table’s files (for Iceberg, also its metadata, manifests and delete files). For native tables, also s3:ListBucket on the registered locations. If you don’t set keys, the default AWS credentials of your environment are used.
  • For Azure: Azure source storage enabled by StarTree support, and a container SAS token with read and list permissions.
  • For Kerberos: contact StarTree support to configure your realm and KDC (krb5.conf). There is no per-table krb5.conf option. StarTree also needs DNS and KDC access.
  • Keytabs, ticket caches, truststores and keystores are local files referenced by path. Contact StarTree support to provision them for your environment.
  • Passwords and tokens can be passed as srn2:secret#... secret references.

How it works

Onboarding is four calls. Each one feeds the next:
All paths are relative to your data-plane base URL. Set export BASE_URL=https://dp.<data-plane-id>.cp.<region>.startree.cloud/api/pinot, the StarTree Cloud data-plane proxy that fronts the controller.If your controller requires authentication, add an Authorization header to every request, for example -H "Authorization: Bearer <token>". The examples below leave it out.

Step 1: Validate and browse the connection

POST /connections/browse Browsing is the connection test. A 200 with an items list, even an empty one, means StarTree reached HMS and authenticated.
  • Set path to "" to list the databases.
  • Set path to a database name to list its tables.
Browse checks the metastore connection only. Storage access is checked at preview, once a table is picked, because one HMS can hold Iceberg and Parquet tables that read storage differently.

Request

Passwords and tokens accept srn2:secret#<name> references. The secret’s data key must be the config key, for example catalog.hive.auth.metastore.truststorePassword.

Response

With "path": "analytics", the items are that database’s tables, each with "type": "TABLE". The table list comes straight from HMS, so it includes tables StarTree can’t onboard, such as ORC, text or transactional (ACID) tables. Those fail at preview with a message naming the reason.

Step 2: Preview the schema

POST /tables/preview Samples the table, infers a Pinot schema, and returns a complete table config. Send a minimal OFFLINE table config whose ExternalTableSyncTask block describes the source. The request and response fields are the same as for other catalogs; see Unity Catalog: Preview the schema for the full field list.
  • Namespace and table come from the browse response: the NAMESPACE you picked and one of its TABLEs.
  • Keep executor: controller and leave out enabled. The Hive catalog doesn’t support the periodic watcher (enabled = true); a config with it is rejected.
  • schedule sets how often the table re-syncs. Without it, nothing runs on its own. It takes a Quartz cron expression.
  • Row deletes (Iceberg only): add "enableDeletionVectors": "true" if the Iceberg table has deletes. Without it, deletes are not applied. See Deletion Vectors.
  • Partition pruning (Iceberg only): add "enablePartitionPruning": "true" to import the partition spec. See Partition pruning.
  • Native Hive tables need at least one Parquet file. The schema comes from the HMS columns, and each HMS partition key becomes a column.

Response

Use schema in step 3 and tableConfigs.offline in step 4. Secrets are masked as *****. For an Iceberg table, the returned config has segment groups turned on. A native Hive table never gets them, because native tables don’t support them.

Step 3: Create the schema

POST /schemas Send the schema object from the preview response, with schemaName set to your table name.

Step 4: Create the table

POST /tables Send tableConfigs.offline from the preview response.
Creating the table doesn’t start a sync. The first one runs at the next schedule tick. To start it now:

Quickstart

The whole flow as one script, for an Iceberg table in an HMS without authentication. Fill in the variables at the top.

Configuration reference

These keys go in the ExternalTableSyncTask block of the table config (the browse request takes the catalog.hive.* ones too). The SQL DDL option column is the name to use in CREATE TABLE ... WITH on the SQL DDL page.

Catalog, table and sync options

Metastore options

TLS options other than tlsEnabled are rejected unless tlsEnabled is true. Hostname and certificate checks are always on. Authentication and certificate failures reject the connection; there is no plaintext fallback.

Storage options

Azure source storage is in beta. Contact StarTree support to enable it for your environment.
For Azure, also set externalTableAccessPolicy to azure-sas. SQL DDL sets it for you. Passwords, tokens and keys accept srn2:secret#<name> references. The secret’s data key must be the task config key, for example catalog.hive.auth.metastore.truststorePassword. Create a new table if the HMS table changes between native Parquet and Iceberg.

Query

Queries are standard SQL. Nothing is HMS-specific.
For a native Hive table, each HMS partition key is a column. Its value comes from HMS, even when the Parquet files don’t contain that column. If a file does contain it, the HMS value wins.
The HMS default partition (__HIVE_DEFAULT_PARTITION__) reads as NULL. If your HMS uses a different marker, set catalog.hive.defaultPartitionName in the task config. After you register a new partition in HMS, it shows up on a later sync. Write new data to new file paths. Pinot does not pick up changes to files it has already read. For Iceberg tables, each sync loads new snapshots. Rows from a new snapshot show up after that sync finishes.

Indexes

Index support is the same as for other External Tables (see Indexes). Nothing here is specific to HMS.

Verify

  • GET $BASE_URL/tables/hms_events_OFFLINE/externalTable/status. Check that snapshotIngestion.lastRunStatus is COMPLETED and lastRunError is empty. HTTP 200 alone doesn’t mean the sync worked. See Observability.
  • GET $BASE_URL/tables/hms_events_OFFLINE/externalTable/checkpoint. Wait for "state": "DONE".
  • Run SELECT COUNT(*) FROM hms_events and compare it with the source.
  • If nothing ever syncs, start the task by hand (see Step 4). If it still doesn’t run, contact StarTree support.

Limits

  • Only the binary Thrift endpoint works. No HTTP, and no thrift+ssl:// (use metastore.tls_enabled).
  • The sync runs on the controller only. The periodic watcher (enabled = true) is not supported.
  • Storage must be S3 (s3://, s3a://) or Azure Blob/ADLS with a SAS token. Locations with credentials or query strings in the URI are rejected.
  • Native Hive: Parquet only. Transactional (ACID) tables are not supported.
  • Native Hive: append-only. Overwrites, deletes, dropped partitions and changed partition values are not reconciled.
  • Native Hive: no snapshots, row deletes, segment groups or snapshot_mode other than latest.
  • Native Hive: the table needs at least one Parquet file at create time.
  • Native Hive: array, map and struct columns are not supported. char(n) and varchar(n) work only for partition keys. Data columns must use string.
  • Native Hive: Parquet column names must match HMS column names exactly, including case. timestamp data columns must use a local timestamp (isAdjustedToUTC=false) or INT96. decimal(p,s) must match the Parquet precision and scale.
  • Schema changes in the source are not applied automatically.
  • To switch a table between native Parquet and Iceberg, create a new Pinot table.
  • StarTree does not renew delegation tokens.
  • Stock Hive 2.3.9 can’t use Kerberos and TLS together on one listener.

Common errors

Errors raised while connecting to HMS can come wrapped as Failed to resolve the external table '<db>.<table>' from the catalog: <message>. Look for the message. Some messages name a SQL DDL option; those come from POST /sql/ddl.

What’s next

  1. Add indexes for your query patterns. → Indexes
  2. Turn on caching and pin hot indexes. → Data and Index Caching
  3. Watch the scheduled syncs. → Observability