For the complete documentation index, see llms.txt. This page is also available as Markdown.

💊Google Cloud Dataproc

Summary

DataFlint reads Spark event logs and cluster and job metadata from your Google Cloud Dataproc project through a service account that you create. The service account is read-only: DataFlint cannot create, change or delete clusters or jobs.

You will:

  1. Create a dedicated service account.

  2. Grant it Dataproc Viewer on the project and Storage Object Viewer on the buckets that hold Spark event logs and driver output.

  3. Create a JSON key.

  4. Add the project in the DataFlint console.

The entire process should take a few minutes.

Supported: Dataproc on Compute Engine. For Dataproc Serverless, contact us.

How it works

Dataproc writes Spark event logs to Cloud Storage. By default this is the cluster's temp bucket, under <cluster-uuid>/spark-job-history/; clusters that set spark:spark.eventLog.dir write to the bucket you configured. Dataproc writes each job's driver output to the cluster's staging bucket. DataFlint discovers the exact locations from each cluster's configuration, so you do not need to send bucket names.

Required IAM permissions (minimal)

Grant the DataFlint service account:

  • Project-level: roles/dataproc.viewer — lists clusters and reads cluster and job metadata.

  • Bucket-level: roles/storage.objectViewer on

    • every bucket your clusters write Spark event logs to (the Dataproc temp bucket by default, or the bucket in spark:spark.eventLog.dir if you set one);

    • the cluster staging bucket (or the output bucket you configured for the cluster), where Dataproc writes job driver output. DataFlint reads it to explain failed runs.

Both grants are read-only.

Installation

Pick one method. All methods create the same resources.

Step 1: Create a service account

  1. Open IAM & Admin → Service Accounts.

  2. Click Create service account.

  3. Use:

    • Name: dataflint-events-reader

    • Description: Read-only access to Dataproc Spark event logs

  4. Click Done.

Step 2: Create a service account key (JSON)

  1. Open the service account.

  2. Go to Keys.

  3. Click Add key → Create new key.

  4. Select JSON.

  5. Download and store the file securely.

Step 3: Grant Dataproc Viewer

  1. Open IAM & Admin → IAM.

  2. Click Grant access.

  3. Principal: dataflint-events-reader@<PROJECT_ID>.iam.gserviceaccount.com

  4. Role: Dataproc Viewer (roles/dataproc.viewer)

Step 4: Grant bucket read access

Repeat for the temp bucket (or your custom event-log bucket) and for the staging bucket:

  1. Open Cloud Storage → Buckets and open the bucket.

    • The temp bucket usually looks like dataproc-temp-<region>-<project-number>-...; the staging bucket like dataproc-staging-<region>-<project-number>-....

  2. Open Permissions.

  3. Click Grant access.

  4. Add the same principal as above.

  5. Role: Storage Object Viewer (roles/storage.objectViewer)

Prerequisites

Create service account

Create key

Grant Dataproc Viewer (project-level)

Grant Storage Object Viewer (bucket-level)

Optional: one-shot setup script

Terraform example

This creates:

  • dataflint-events-reader service account

  • a service account key

  • roles/dataproc.viewer binding on the project

  • roles/storage.objectViewer on the temp bucket and the staging bucket

Apply and export the key

Add it in DataFlint

In the DataFlint console go to Admin Panel → Environment Management → Add New → Dataproc and fill in:

  • Environment name

  • Engine type — Compute Engine

  • Region — one region per environment. Add another environment for each additional region.

  • GCP project ID

  • Cluster ID (optional) — restrict ingestion to one cluster

  • Service account key — paste the JSON key file contents

Click Add Environment. The environment shows as Pending approval while DataFlint verifies access; ingestion starts once it is approved.

Rotating the key

Create a new key for the service account, edit the environment in the console, paste the new key, and then delete the old key in Google Cloud.

Use the key to test that listing clusters and reading objects works.

Last updated