Skip to main content

GCP Lakehouse Writer initial setup

Before you configure GCP Lakehouse Writer, prepare the Google Cloud catalog, buckets, Spark runtime, service accounts, IAM roles, and Striim Connection Profiles required by the writer.

Set up Google Cloud Platform for GCP Lakehouse Writer

Complete the following setup before creating a GCP Lakehouse Writer application.

Plan the catalog mode

Choose the catalog endpoint type before creating tables. Use REST catalog mode for new deployments when its prerequisites are met. Use custom catalog mode for existing custom-catalog deployments or when you need standard BigQuery dataset.table query naming.

Do not switch catalog endpoint types for an existing target table.

Set up the GCS data lake bucket

Create or identify the GCS bucket that stores target Iceberg table data and metadata. Configure this location in GCP Lakehouse Writer as IcebergTablesLocation. See Configure Google Cloud Storage (GCS) buckets for Iceberg Writer.

For REST catalog mode, use the bucket root, for example gs://my-bucket or gs://my-bucket/. Do not use a subdirectory path.

Set up the GCS external staging location

Create a GCS folder for the external stage. The external stage should be reachable from the GCP Managed Apache Spark cluster and should be different from the Iceberg warehouse location.

If the staging bucket and data lake bucket are different, grant the required storage permissions on both buckets.

Enable the Lakehouse API

Enable the Lakehouse API in the Google Cloud project. As of July 2026 the API is still named BigLake API in Google Cloud.

Create a single-bucket catalog

Create a GCP Lakehouse Runtime Catalog resource that points to the Cloud Storage bucket. A single-bucket catalog supports one catalog per bucket, and the catalog name typically matches the bucket name. For example, for gs://my-bucket, the catalog name is usually my-bucket.

To create the catalog in Google Cloud Console:

  1. Open the Lakehouse page in Google Cloud Console.

  2. Click Create catalog.

  3. For Catalog type, select Iceberg Rest Catalog.

  4. For Lakehouse catalog bucket options, select Single bucket catalog.

  5. Enter or browse for the Cloud Storage bucket to use.

  6. Click Continue.

  7. Choose the authentication method: End-user credentials or Credential vending mode.

  8. Click Create.

  9. If you selected credential vending mode, open the resulting catalog details page, click Set bucket permissions under Authentication method, and confirm. This grants the catalog service account roles/storage.objectUser on the associated bucket.

A single-bucket catalog ties the catalog to a single bucket and typically ties the catalog name to the bucket name. Consider that constraint when planning the deployment.

Create a GCP Managed Apache Spark cluster

Create or identify a GCP Managed Apache Spark cluster that uses a Spark 3.5.1-compatible image. Use image version 2.2-debian12; that image shorthand resolves to 2.2.42-debian12.

When creating the cluster:

  • Use image version 2.2-debian12.

  • Enable the component gateway so Spark History Server can be viewed from outside Google Cloud.

  • Do not enable Internal IP only. If you use gcloud, do not use --no-address.

  • Enable the Spark performance enhancement properties.

  • Add the updated Striim setupIcebergDataprocV1.sh initialization script as an initialization action.

  • Use the updated initialization script that installs the Iceberg 1.10.0 libraries required for REST catalog support.

Get the initialization script

The initialization script is bundled in the Striim Utilities zip file. In Striim, click Download Utilities under the About Striim icon, unzip the file, and locate setupIcebergDataprocV1.sh in Striim/tools/bin.

Upload setupIcebergDataprocV1.sh to a GCS location that the GCP Managed Apache Spark cluster can access. Use that gs:// URI as the initialization action when creating the cluster.

Reuse an existing GCP Managed Apache Spark cluster

You can reuse an existing GCP Managed Apache Spark cluster if it has capacity for Iceberg Spark jobs and is not configured with Internal IP only. Check this in Google Cloud under Managed Service for Apache Spark cluster (Dataproc) > Configuration.

If the required Iceberg libraries are not already installed, connect to the master node with SSH and install the libraries as a super user:

sudo su
wget -P /usr/lib/striim/iceberg/ "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-spark-runtime-3.5_2.12/1.10.0/iceberg-spark-runtime-3.5_2.12-1.10.0.jar";
wget -P /usr/lib/striim/iceberg/ "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-spark-extensions-3.5_2.12/1.10.0/iceberg-spark-extensions-3.5_2.12-1.10.0.jar";
wget -P /usr/lib/striim/iceberg/ "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-gcp/1.10.0/iceberg-gcp-1.10.0.jar";
wget -P /usr/lib/striim/iceberg/ "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-gcp-bundle/1.10.0/iceberg-gcp-bundle-1.10.0.jar";
wget -P /usr/lib/striim/iceberg/ "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-bigquery/1.10.0/iceberg-bigquery-1.10.0.jar";

Verify that the files are present:

cd /usr/lib/striim/iceberg/
ls

Expected files:

iceberg-gcp-1.10.0.jar
iceberg-gcp-bundle-1.10.0.jar 
iceberg-spark-extensions-3.5_2.12-1.10.0.jar 
iceberg-spark-runtime-3.5_2.12-1.10.0.jar
iceberg-bigquery-1.10.0.jar

Iceberg runtime libraries

GCP Managed Apache Spark images do not include the required Iceberg runtime libraries by default. Install the required libraries on all cluster nodes by using the Striim-provided setupIcebergDataprocV1.sh initialization script or by installing the jars manually on an existing cluster.

Library

Version

Notes

iceberg-spark-runtime-3.5_2.12

1.10.0

Required Spark runtime library for Iceberg on Spark 3.5.

iceberg-spark-extensions-3.5_2.12

1.10.0

Required Spark SQL extensions for Iceberg.

iceberg-gcp-bundle

1.10.0

Required bundled GCP support library for Lakehouse integration.

iceberg-gcp

1.10.0

Required Google Cloud integration library for Iceberg.

iceberg-bigquery

1.10.0

Required as it provides the components needed for Iceberg to interact with Google BigQuery as a catalog and metadata store

Google Cloud Java client libraries

GCP Lakehouse Writer ships with Java client libraries used for GCS and Managed Service for Apache Spark connectivity.

Library

Version

Usage

google-cloud-storage

2.43.1

Storage access and external staging operations on GCS.

google-cloud-dataproc

4.48.0

GCP Managed Apache Spark job submission, status tracking, and monitoring.

Create Google Cloud service accounts and IAM roles

Create or reuse the Google Cloud service accounts required by your deployment and obtain the JSON key files needed for the Connection Profiles. The required roles depend on catalog endpoint type and credential vending configuration.

Required roles for Managed Service for Apache Spark runtime service account

The Managed Service for Apache Spark runtime service account must have permissions for Managed Service for Apache Spark, GCS, and GCP Lakehouse Runtime Catalog operations. The exact roles depend on the catalog endpoint type and credential vending mode.

Custom catalog mode

When using CustomIcebergCatalogForBigQuery, the GCP Managed Apache Spark runtime service account requires:

Role

Resource

Purpose

roles/dataproc.worker

Managed Service for Apache Spark cluster

Submit and operate Spark jobs.

roles/bigquery.dataEditor

BigQuery

Create and modify the BigQuery datasets and tables backing the Lakehouse catalog resources.

roles/storage.objectUser

GCS bucket

Read and write table data files.

REST catalog mode without credential vending

When using IcebergRESTCatalog without credential vending, the GCP Managed Apache Spark runtime service account requires:

Role

Resource

Purpose

roles/biglake.editor

BigLake

Write-workload access for Lakehouse catalog-backed tables.

roles/storage.objectUser

GCS bucket

Read and write table data files.

Write roles include the required read permissions, so separate read-only roles are not required for this write workload.

REST catalog mode with credential vending

When using IcebergRESTCatalog with credential vending:

Role

Resource

Purpose

roles/biglake.editor

BigQuery / BigLake

Access catalog resources and obtain vended credentials for table data.

roles/storage.objectUser

GCS data lake bucket

Required for the GCP Lakehouse Runtime Catalog service account so it can vend credentials.

With credential vending enabled, the Spark runtime service account does not require direct GCS bucket permissions for table data. The GCP Lakehouse Runtime Catalog service account still requires roles/storage.objectUser on the bucket.

External staging area

Regardless of catalog mode, the GCP Managed Apache Spark runtime service account requires:

Role

Resource

Purpose

roles/storage.objectUser

GCS staging bucket

Read, write, and delete temporary batch data, metadata, and execution artifacts in the external stage location.

If the staging area and data lake use the same GCS bucket, storage permissions can be combined. If they use different buckets, grant storage permissions on both buckets.

The user who creates the prerequisites may also need Google Cloud administrative roles, such as roles/dataproc.admin to create the cluster and roles/storage.admin to set up staging buckets.

Create Connection Profiles

Create the following Striim Connection Profiles before configuring the target adapter.

GCP Managed Apache Spark Connection Profile

Use the GCPManagedApacheSpark endpoint, shown as Google Cloud Managed Apache Spark in the UI. This Connection Profile configures connectivity to the GCP Managed Apache Spark cluster for job submission and monitoring.

Property

Description

Required

ProjectID

Google Cloud project ID where the GCP Managed Apache Spark cluster is deployed.

Yes

Region

Google Cloud region where the cluster runs, for example us-central1 or asia-south1.

Yes

DataProcClusterName

Name of the GCP Managed Apache Spark cluster, formerly Dataproc, to use for Spark job execution.

Yes

ServiceAccountKey

JSON key for the Google Cloud service account used to submit and monitor Spark jobs.

No

ConnectionRetryPolicy

Retry policy for Dataproc API calls, including retry attempts, backoff strategy, and timeouts.

No

AdditionalConfiguration

Optional Spark configuration key-value pairs for jobs submitted through this profile.

No

The service account used in this Connection Profile must have the required permissions, including roles/dataproc.worker or equivalent permissions to submit and monitor jobs.

GCS Connection Profile

Use the GCS endpoint for both the data lake and the external staging area. You can reuse the same GCS Connection Profile for both when they share the same authentication and project configuration.

Property

Description

Required

ProjectID

Google Cloud project ID where the GCS buckets are located.

Yes

ServiceAccountKey

JSON key for the Google Cloud service account used to access GCS.

No

ConnectionRetryPolicy

Retry policy for GCS API calls, including retry attempts, backoff strategy, and timeouts.

No

The service account used in the GCS Connection Profile must have the required storage permissions, including roles/storage.objectUser for read/write access to the data lake and staging buckets.

GCP Lakehouse Runtime Catalog Connection Profile

Use the GCPLakehouseRuntimeCatalog endpoint, shown as Google Cloud Lakehouse Runtime Catalog in the UI.

Property

Description

Required

CatalogEndpointType

Catalog endpoint type. Set to IcebergRESTCatalog or CustomIcebergCatalogForBigQuery. In the UI, these appear as Iceberg REST Catalog and Custom Iceberg Catalog For BigQuery.

Yes

CredentialVending

Enables credential vending. Enable only when the Google Cloud catalog is configured for credential vending. Applicable only when CatalogEndpointType is IcebergRESTCatalog.

No

ProjectID

Google Cloud project ID for catalog access and billing.

Yes

Region

Google Cloud region for the catalog.

Yes

Specifying additional configuration

Connection profiles support additional configuration properties for behavior that is not represented by standard profile properties. These properties are specified as key-value pairs and are applied when the client is initialized or reinitialized.

Additional configuration for GCP Lakehouse Runtime Catalog

Use additional configuration on the GCP Lakehouse Runtime Catalog Connection Profile when you need to set catalog configuration that cannot be set with the standard profile properties.

If an additional configuration property maps to an existing Connection Profile property, the additional configuration value overrides the Connection Profile value.

Additional configuration for GCP Managed Apache Spark

Use additional configuration on the GCP Managed Apache Spark Connection Profile to provide Spark configuration properties. These settings can override the default Spark configuration on the cluster and can improve performance for specific workloads.

Common Spark performance properties include:

Property

Description

Example value

spark.executor.instances

Number of executor instances to use.

4

spark.executor.cores

Number of cores per executor.

4

spark.executor.memory

Amount of memory per executor.

8g

spark.driver.memory

Amount of memory for the driver process.

4g

spark.sql.shuffle.partitions

Number of partitions for shuffle operations.

200