Lakehouse API C++ Client Library

An idiomatic C++ client library for the Lakehouse API.

The Lakehouse API (formerly BigLake API) provides access to a serverless, fully managed, and highly available metastore that provides a single source of truth for your data lakehouse. It lets multiple engines—including Apache Spark, Google Managed Spark, Apache Flink, Trino and BigQuery—share tables and metadata for key open formats (Apache Iceberg, Apache Hive), and query the same copy of data. Plus, through the Lakehouse runtime catalog federation seamlessly unite your lakehouse ecosystem, letting Iceberg compatible engines on Google Cloud (BigQuery, Google Managed Spark) discover and analyze enterprise data across Snowflake, Databricks, and AWS Glue.

While this library is GA, please note that the Google Cloud C++ client libraries do not follow Semantic Versioning.

Quickstart

The following shows the code that you'll run in the google/cloud/biglake/quickstart/ directory, which should give you a taste of the Lakehouse API C++ client library API.

#include "google/cloud/biglake/hive/v1/hive_metastore_client.h"
#include "google/cloud/project.h"
#include <iostream>

int main(int argc, char* argv[]) try {
  if (argc != 2) {
    std::cerr << "Usage: " << argv[0] << " project-id\n";
    return 1;
  }

  auto const project = google::cloud::Project(argv[1]);

  namespace biglake = ::google::cloud::biglake_hive_v1;
  auto client = biglake::HiveMetastoreServiceClient(
      biglake::MakeHiveMetastoreServiceConnection());

  for (auto r : client.ListHiveCatalogs(project.FullName())) {
    if (!r) throw std::move(r).status();
    std::cout << r->DebugString() << "\n";
  }

  return 0;
} catch (google::cloud::Status const& status) {
  std::cerr << "google::cloud::Status thrown: " << status << "\n";
  return 1;
}

Main classes

The main class in this library is biglake_hive_v1::HiveMetastoreServiceClient. All RPCs are exposed as member functions of this class. Other classes provide helpers, configuration parameters, and infrastructure to mock biglake_hive_v1::HiveMetastoreServiceClient when testing your application.

More Information