Skip to main content

Hive Catalog Write Guide

OLake Go integrates with Hive Catalog to provide full support for Apache Iceberg tables.

With this setup:

  • Data is stored in object storage (S3, GCS, MinIO, or any S3-compatible system).
  • Metadata is managed by Hive Metastore.
  • OLake Go seamlessly writes into Iceberg tables using Hive Metastore + Object storage.

Prerequisites

Before configuring OLake Go with Hive Catalog, ensure the following:

1. Hive Metastore

A Hive Metastore service will serve as the Iceberg metadata catalog. This can be:

  • Managed service: GCP Dataproc Metastore, AWS EMR, or Azure HDInsight
  • Self-hosted: Apache Hive Metastore running on your infrastructure
  • Local development: Docker-based Hive Metastore

Required Metastore Configuration:

  • Thrift protocol enabled (default port 9083)
  • Database backend (PostgreSQL, MySQL, or other JDBC-supported database) for metadata storage with required permissions of creating, inserting, updating, deleting, and reading from the database.

2. Object Storage

A bucket for storing Iceberg data files (Parquet + metadata).

Configuration


Hive endpoint config form with fields for Hive URI, S3 path, AWS keys, and region

ParameterSample ValueDescription
S3 Path
required
gs://hive-dataproc-generated-bucket/hive-warehouse
or
s3://<BUCKET_NAME>/
S3 bucket path where Iceberg table data and metadata files will be stored.
AWS Region
required
us-east-1AWS Region where your S3 bucket exist. Required so OLake Go calls the correct regional S3 endpoints.
Hive Clients
required
5Specifies the number of Hive clients allocated for managing interactions with the Hive Metastore.
Hive URI
required
thrift://<hostname>:9083 or thrift://METASTORE_IP:9083Thrift endpoint URL for your Hive Metastore service. OLake Go uses this to read and write Iceberg catalog metadata.
AWS Access KeyXXXAWS access key ID for authentication. Optional if using IAM roles or instance profiles.

If using IAM:
Docker Compose: add the required IAM environment variables under x-envs in your compose file. See Service Environment Variables for setup details.
Kubernetes: set up pod IAM in Cloud IAM Integration.
AWS Secret KeyXXXAWS secret access key for authentication. Optional if using IAM roles or instance profiles.

If using IAM:
Docker Compose: add the required IAM environment variables under x-envs in your compose file. See Service Environment Variables for setup details.
Kubernetes: set up pod IAM in Cloud IAM Integration.
S3 Endpointhttps://glue.ap-south-1.amazonaws.comS3 API endpoint for writing Iceberg data files. Optional for AWS S3 but required for S3-compatible storage like MinIO.
Catalog Nameolake_icebergName of the Iceberg catalog OLake Go registers tables under. Defaults to olake_iceberg if left empty.
Use SSL for S3false/trueControls whether OLake Go uses HTTPS when connecting to the S3 API for writing Iceberg files. Set to false when S3 Endpoint uses http:// (for example, local MinIO). Set to true when the endpoint uses https:// (for example, AWS S3 or TLS-enabled MinIO).
Use Path Style for S3false/trueControls how OLake Go formats S3 request URLs. Path-style puts the bucket name in the URL path instead of the hostname. This is required for MinIO and other S3-compatible storage that do not support AWS-style virtual-hosted URLs.
Enable SASL for Hivefalse/trueEnables SASL authentication when OLake Go connects to the Hive Metastore over Thrift. Required only if your metastore enforces SASL-based client authentication.
Enable Arrow Writesfalse/trueWrites data and delete files using Apache Arrow based writer and registers them in Iceberg.

Click Create -> to test the connection and verify that OLake Go can validate both the Hive Metastore connection and S3 compatible object storage access.

Catalog Name Supported for v0.3.5 and above

For the catalog name, OLake Go only supports lowercase letters and underscores. Spaces and special characters are not supported.


Setup For Testing

GCP Dataproc Metastore

OLake Go supports using Google Cloud Dataproc Metastore (Hive) as the Iceberg catalog and Google Cloud Storage (GCS) as the data lake destination. This allows you to leverage GCP-native services for scalable, managed metadata and storage.

Dataproc Metastore Metastore service configuration panel showing service properties and Hive warehouse GCS bucket path

Step-by-Step Setup

  1. Create a GCP Project (if you don't have one).
  2. Provision a Dataproc Metastore (Hive):
    • Go to the GCP Console → Dataproc → Metastore services.
    • Click "Create Metastore Service".
    • Fill in service name, location, version, release channel, port (default: 9083), and service tier.
    • Set the endpoint protocol to Thrift.
    • Expose the service to your running network (VPC/subnet).
    • Enable the Data Catalog sync option if desired.
    • Choose database type and other options as needed.
    • Click Submit. Creation may take 20–30 minutes.
  3. Expose the Metastore endpoint to the network where OLake will run (ensure network connectivity and firewall rules allow access to the Thrift port).
  4. Create or choose a GCS bucket for Iceberg data.
  5. Deploy OLake Go in the same network (or with access to the Metastore endpoint).
note
  • The hive_uri must use the Thrift protocol and point to your Dataproc Metastore endpoint.
  • The iceberg_s3_path can use the gs:// prefix for GCS buckets.
  • Ensure OLake Go has network access to the Metastore and permissions to write to the GCS bucket.

Troubleshooting

The OLake Go Hive Catalog connector stops immediately upon encountering errors to ensure data accuracy. Below are common issues and their fixes:

  • Hive Metastore JAR Dependencies Missing
    • Cause: Required JAR files not available in Hive Metastore classpath for S3 and PostgreSQL connectivity.
    • Fix:
      • Verify the following essential JARs are present in /opt/hive/lib/:
        # Check for required JARs
        ls -la /opt/hive/lib/ | grep -E "(hadoop-aws|postgresql|aws-java-sdk)"
      • Required JARs for S3 Integration:
        • hadoop-aws-3.3.4.jar - Enables S3A filesystem support
        • aws-java-sdk-bundle-1.12.262.jar - AWS SDK for S3 operations
      • Required JARs for PostgreSQL Backend:
        • postgresql-42.5.4.jar - PostgreSQL JDBC driver for metadata storage
  • Connection Refused to Hive Metastore
    • Cause: Hive Metastore service not accessible or network connectivity issues.
    • Fix:
      • Verify Hive Metastore is running and accessible:
        telnet <hive-metastore-host> 9083
      • Check hive_uri format: thrift://<hostname>:9083
      • Use host.docker.internal instead of localhost when running in Docker.
      • Ensure firewall rules allow access to port 9083.
      • For GCP Dataproc Metastore, verify VPC connectivity and service status.
  • Database Backend Connection Failed
    • Cause: PostgreSQL/MySQL backend database not accessible or misconfigured.
    • Fix:
      • Verify database backend is running:
        psql -h <db-host> -p 5432 -U <username> -d <database>
      • Ensure database user has required permissions:
        GRANT CREATE, INSERT, UPDATE, DELETE, SELECT ON DATABASE <database_name> TO <username>;
      • Check Hive Metastore configuration for correct JDBC URL.
  • S3/Object Storage Access Denied
    • Cause: Invalid AWS credentials or insufficient S3 bucket permissions.
    • Fix:
      • Verify AWS credentials and permissions:
        aws s3 ls s3://<bucket-name>
      • For MinIO, ensure correct endpoint and credentials:
        mc config host add minio http://<endpoint> <access-key> <secret-key>
        mc ls minio/<bucket-name>
      • Check s3_endpoint, aws_access_key, and aws_secret_key configuration.
      • Ensure bucket exists and is in the correct region.
  • Path Style Access Error with MinIO
    • Cause: S3 addressing configuration issue with MinIO or non-AWS S3.
    • Fix:
      • Set s3_path_style: true for MinIO and non-AWS S3 services.
      • Use correct endpoint format: http://minio:9000 (no bucket in URL).
      • Ensure s3_use_ssl: false for HTTP endpoints.


💡 Join the OLake Community!

Got questions, ideas, or just want to connect with other data engineers?
👉 Join our Slack Community to get real-time support, share feedback, and shape the future of OLake together. 🚀

Your success with OLake is our priority. Don’t hesitate to contact us if you need any help or further clarification!