Skip to content

Hive

Adding and configuring a Hive connection within Qualytics empowers the platform to build a symbolic link with your schema to perform operations like data discovery, visualization, reporting, syncing, profiling, scanning, anomaly surveillance, and more.

This documentation provides a step-by-step guide on how to add Hive as a source datastore in Qualytics. It covers the entire process, from initial connection setup to testing and finalizing the configuration.

By following these instructions, enterprises can ensure their Hive environment is properly connected with Qualytics, unlocking the platform's potential to help you proactively manage your full data quality lifecycle.

hive-connection-form

Let’s get started 🚀

Hive Setup Guide

Qualytics connects to Hive through the Hive JDBC driver (HiveServer2). It accesses the Hive metastore for schema and table discovery, and reads table data via HiveQL SELECT queries for profiling and scanning operations. Qualytics also identifies partition columns from Hive metastore metadata for optimized data reading.

Minimum Hive Permissions (Source Datastore)

Permission Purpose
SELECT ON DATABASE <database_name> Access the database and its metadata
SELECT ON TABLE <database_name>.* Read data from all tables for profiling and scanning

Note

Qualytics does not support Hive as an enrichment datastore. You can point to a different enrichment datastore instead.

Example: Source Datastore User (Read-Only)

Replace <database_name> with your actual value.

-- Grant read access to the target database and all its tables
GRANT SELECT ON DATABASE <database_name> TO USER qualytics_read;
GRANT SELECT ON ALL TABLES IN DATABASE <database_name> TO USER qualytics_read;

Note

If using Kerberos authentication, ensure the Kerberos principal has been granted the same SELECT privileges on the target database. Configure the Kerberos principal in the connection form instead of username/password.

Info

If your Hive environment uses ZooKeeper for HiveServer2 high availability (HA), enable the ZooKeeper HA toggle in the connection form. This allows Qualytics to discover and connect to available HiveServer2 instances automatically through the ZooKeeper quorum.

Troubleshooting Common Errors

Error Likely Cause Fix
User is not allowed to impersonate The HiveServer2 proxy user configuration does not allow the Qualytics user Add the Qualytics user to the hadoop.proxyuser.<hive_user>.users property in core-site.xml
Permission denied: user does not have SELECT privilege The user lacks SELECT on the target database or table Run GRANT SELECT ON DATABASE <database_name> TO USER <user>
GSS initiate failed (Kerberos) Kerberos ticket is expired, the principal is incorrect, or the KDC is unreachable Verify the Kerberos principal, ensure the keytab is valid, and check KDC connectivity
Could not open client transport HiveServer2 is not reachable or the port (default 10000) is incorrect Verify the host, port, and that HiveServer2 is running
Database does not exist The database name (schema) in the connection form is incorrect Verify the database name with SHOW DATABASES in HiveQL

Detailed Troubleshooting Notes

Authentication Errors

The error GSS initiate failed (Kerberos) or Could not open client transport indicates an authentication or transport problem.

Common causes:

  • Kerberos ticket expired: the Kerberos ticket has expired and needs to be renewed with kinit.
  • Wrong principal: the Kerberos principal in the connection form does not match the one configured in the Hive server.
  • KDC unreachable: the Key Distribution Center (KDC) is not reachable from the Qualytics server.
  • HiveServer2 not running: the HiveServer2 process is not started or has crashed.

Note

If using basic authentication (username/password), ensure HiveServer2 is configured to accept password-based authentication (hive.server2.authentication=CUSTOM or LDAP).

Permission Errors

The error Permission denied: user does not have SELECT privilege means the user authenticated successfully but lacks the necessary Hive grants.

Common causes:

  • Missing SELECT on database: the user does not have SELECT on the target database.
  • Missing SELECT on table: the user has database-level access but not table-level access.
  • Ranger/Sentry policy: if Apache Ranger or Sentry is enabled, permissions are managed through policies rather than Hive GRANT statements.

Connection Errors

The error Could not open client transport or User is not allowed to impersonate indicates a transport or proxy user issue.

Common causes:

  • HiveServer2 not reachable: the host or port (default 10000) is incorrect.
  • Proxy user not allowed: the hadoop.proxyuser.<hive_user>.users property in core-site.xml does not include the Qualytics user.
  • SSL required: HiveServer2 requires SSL but the connection is not configured for it.

Tip

Start by confirming credentials and Kerberos configuration are valid (authentication errors), then verify Hive grants or Ranger policies (permission errors), and finally check HiveServer2 connectivity (connection errors).

Add a Source Datastore

A source datastore is a storage location Qualytics connects to so it can profile, scan, and monitor data. Adding Hive as a source lets Qualytics query it through the Hive JDBC driver and run quality operations on the tables it discovers.

Before you start, review the Minimum Hive Permissions the connecting user needs.

Enrichment lives on another connector

Qualytics does not support Hive as an enrichment datastore. Create the enrichment datastore on a supported connector instead, then link it to your Hive source datastore. See Supported Enrichment Datastores for the list.

Field reference

The Add Datastore page shows the sections below when Hive is selected. When reusing an existing connection, the Connection Properties and Secrets Management sections come already filled in and read-only: Qualytics has already validated those credentials, so you fill in only the Datastores Extraction and the Datastore Properties. To change a saved connection's credentials, edit the connection through the Manage Connections page; edits there apply to every datastore that reuses the connection.

Connection Properties

These fields define the HiveServer2 endpoint Qualytics connects to. They belong to the connection: when reusing an existing connection, they come already filled in and read-only.

FIELD REQUIRED TYPE DESCRIPTION
Connection Name Text A label for the saved connection (e.g., acme_hive_reporting), so other datastores can reuse it later.
ZooKeeper HA Checkbox Records on the connection that the cluster is fronted by ZooKeeper. Off by default. It is the Type below that makes Qualytics look HiveServer2 up through ZooKeeper, so pick Zookeeper or Zookeeper Kerberos for that.
Host Text The hostname or address of HiveServer2. With a ZooKeeper Type, list the ZooKeeper quorum hosts separated by commas instead.
Port Number The port HiveServer2 listens on. Defaults to 10000.

Authentication

Choose how Qualytics authenticates to HiveServer2. Setting Type changes the credential fields shown below it, so pick the tab that matches your choice. These fields also belong to the connection: already filled in and read-only when reusing one.

FIELD REQUIRED TYPE DESCRIPTION
Type Option Set to Basic, which is the default (BASIC in the API).
User Text The Hive user Qualytics connects as. Comes filled in as hive.
Password Text The password for that user. Leave it empty on a cluster that does not authenticate.
FIELD REQUIRED TYPE DESCRIPTION
Type Option Set to Kerberos (KERBEROS in the API).
Principal Text The Kerberos principal of the HiveServer2 service, in the form hive/_HOST@DOMAIN.COM.

No password is asked for: Kerberos authenticates through the ticket rather than a password.

FIELD REQUIRED TYPE DESCRIPTION
Type Option Set to Zookeeper (ZOOKEEPER in the API). Qualytics finds HiveServer2 through the ZooKeeper quorum named in Host instead of connecting to one fixed endpoint.

No credential fields appear for this type: neither a user nor a password is asked for.

FIELD REQUIRED TYPE DESCRIPTION
Type Option Set to Zookeeper Kerberos (ZOOKEEPER_KERBEROS in the API). Combines the ZooKeeper lookup with Kerberos authentication.
Principal Text The Kerberos principal of the HiveServer2 service, in the form hive/_HOST@DOMAIN.COM.

As with Kerberos, no password is asked for.

Secrets Management

This group is optional: use it only if you want Qualytics to pull credentials from a secrets manager instead of typing them into the form. Turn on HashiCorp Vault to show the fields below. Despite the label, any secrets manager that exposes a compatible REST API works, not only HashiCorp Vault; see Secrets Management. It also belongs to the connection: read-only when reusing an existing connection.

FIELD REQUIRED TYPE DESCRIPTION
Login URL Text The Vault endpoint Qualytics uses to authenticate (e.g., https://vault.example.com/v1/auth/approle/login).
Credentials Payload Text A JSON body containing the credentials Vault expects (e.g., {"role_id":"...","secret_id":"..."}).
Token JSONPath Text The JSONPath that extracts the client token from Vault's response. Defaults to $.auth.client_token.
Secret URL Text The Vault path where the secret is stored (e.g., https://vault.example.com/v1/secret/data/hive).
Token Header Name Text The HTTP header name used to send the token. Defaults to X-Vault-Token.
Data JSONPath Text The JSONPath that extracts the secret payload from Vault's response. Defaults to $.data.

Datastores Extraction

Pick the schema or schemas Qualytics should read from. You fill these in on both flows.

FIELD REQUIRED TYPE DESCRIPTION
Schema Option One or more Hive schemas to read from. Each schema you pick becomes its own Qualytics datastore. Defaults to default, and you can click the refresh icon to load the ones visible to the user.

No catalog step

Hive has no separate catalog selection, so you pick the schema directly. Selecting more than one creates one source datastore per schema, named from the Name Template. See Multi-Schema Source Datastore Creation for details.

System schema

Hive's system schema is left out of discovery, so it does not appear in the list.

Datastore Properties

Common fields for every source datastore, shown below the Datastores Extraction section. You fill these in on both flows.

FIELD REQUIRED TYPE DESCRIPTION
Name Template Text Defines the naming pattern for each source datastore being created. Use {{schema}} as a placeholder that gets replaced with the actual schema name (e.g., hive_{{schema}} becomes hive_sales). Left empty, the datastore is named from the connection name and the schema.
Group Option Organizes your datastores under a shared group in the navigation tree. Select an existing group or create a new one with the Add New Group toggle.
Teams Option Select one or more teams to associate with this source datastore.
Initiate Sync Checkbox Automatically sync the datastore to detect containers and fields after creation.

Steps

There are two ways to set up the connection: reuse a connection you already saved (Existing Connection) or create a new one from scratch (New Connection). The tabs below walk through each option; pick the one you want to follow. Each field is described in the Field reference above.

Step 1: Navigate to the Source Datastores page.

Step 2: Click the Add Source Datastore button at the top-right corner.

Step 3: The Add Datastore page opens.

Step 4: Select New Connection next to the Search field.

Step 5: Select Hive from the connector grid. Use the search field to filter connectors by name.

Step 6: Fill in the Connection Properties: the Connection Name, Host, and Port, then fill in the Authentication fields for the Type you choose. Pick a ZooKeeper Type when the cluster is fronted by a ZooKeeper quorum.

Step 7: Optionally, expand Secrets Management to retrieve credentials from a secrets manager.

Step 8: Fill in the Datastores Extraction fields (Schema) and the Datastore Properties.

Step 9: Click Test connection. A success message confirms that the connection has been verified.

Info

The Finish and Next buttons stay disabled until the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.

Step 10: Click Finish to create the datastore.

Tip

To link an enrichment datastore so Qualytics can store anomalies and metadata from the first operation, click Next instead of Finish. It has to live on a connector other than Hive; see Link Enrichment on Datastore Creation.

Step 11: A success dialog confirms that your datastore has been added. Click Go to your datastore to open its page.

Step 1: Navigate to the Source Datastores page.

Step 2: Click the Add Source Datastore button at the top-right corner.

Step 3: The Add Datastore page opens.

Step 4: Select Existing Connection next to the Search field.

Step 5: Select the saved Hive connection from the grid. Use the search field to filter connections by name. The Connection Properties and Secrets Management sections come already filled in and read-only.

Start a new connection from this one

To use the selected connection as a starting point for a brand-new connection instead, click the Duplicate as a new connection button on the selected connection. The form switches to New Connection mode with the connection's settings already filled in for you to adjust.

Step 6: Fill in the Datastores Extraction fields (Schema) and the Datastore Properties. These are the only fields left to fill in.

Step 7: Click Test connection. A success message confirms that the connection has been verified.

Info

The Finish and Next buttons stay disabled until the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.

Step 8: Click Finish to create the datastore.

Tip

To link an enrichment datastore so Qualytics can store anomalies and metadata from the first operation, click Next instead of Finish. It has to live on a connector other than Hive; see Link Enrichment on Datastore Creation.

Step 9: A success dialog confirms that your datastore has been added. Click Go to your datastore to open its page.

API Payload Examples

This section provides detailed examples of API payloads to guide you through the process of creating and managing datastores using Qualytics API.

Each example includes endpoint details, sample payloads, and instructions on how to replace placeholder values with actual data relevant to your setup.

Creating a Datastore

This section provides a sample payload for creating a datastore. Replace the placeholder values with actual data relevant to your setup.

Endpoint (Post)

/api/datastores (post)

    {
        "name": "your_datastore_name",
        "teams": ["Public"],
        "schema": "hive_schema",
        "enrichment_only": false,
        "trigger_sync": true,
        "connection": {
            "name": "your_connection_name",
            "type": "hive",
            "host": "hive_host",
            "port": 10000,
            "username": "hive_username",
            "password": "hive_password",
            "parameters": {
                "zookeeper": false,
                "authentication_type": "BASIC"
            }
        }
    }
    {
        "name": "your_datastore_name",
        "teams": ["Public"],
        "schema": "hive_schema",
        "enrichment_only": false,
        "trigger_sync": true,
        "connection_id": 123
    }
# Step 1: Create a Connection
qualytics connections create \
    --type hive \
    --name "your_connection_name" \
    --host ${HIVE_HOST} \
    --port 10000 \
    --username ${HIVE_USER} \
    --password ${HIVE_PASSWORD}

# Step 2: Create a Source Datastore
qualytics datastores create \
    --name "your_datastore_name" \
    --connection-name "your_connection_name" \
    --schema default

Linking Datastore to an Enrichment Datastore through API

Endpoint (Patch)

/api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)