gcp-spark

Generates and executes PySpark code on Google Cloud Dataproc clusters and Serverless.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/tottenjordan/me-skittles --skill gcp-spark-tottenjordan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcp-spark
Source: https://github.com/tottenjordan/me-skittles/tree/main/gemini/gcp-spark
Command: npx skills add https://github.com/tottenjordan/me-skittles --skill gcp-spark-tottenjordan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Spark code for Google Cloud requires knowing Dataproc execution models, connector configurations for BigQuery, BigLake Iceberg, and Spanner, and avoiding common pitfalls like schema mismatches and missing imports. This Skill enforces a verified workflow so generated Spark code compiles, runs, and reads/writes data correctly on GCP. ## Core Features & Use Cases - Guided Spark Code Generation: Produces Python notebooks (.ipynb) following a mandatory workflow: schema discovery, source verification, code generation, schema validation, compilation, and execution. - Data Source Integration: Provides verified read/write patterns for BigQuery, BigLake Iceberg catalogs (GCS and S3 storage), Cloud Spanner, GCS files, Cloud SQL, and Pub/Sub. - Dataproc Resource Management: Covers listing and submitting clusters, jobs, serverless batches, and interactive sessions via gcloud or MCP tools. - ML on Spark: Includes verified patterns for XGBoost and native Spark ML, with warnings about LightGBM dependency conflicts on Dataproc Serverless. - Use Case: Ask the agent to build an ETL pipeline that reads a CSV from GCS, enriches it with a BigQuery reference table, and writes the result to a BigLake Iceberg table, then submit it as a Dataproc Serverless batch. ## Quick Start Use the gcp-spark skill to write a PySpark notebook that reads a CSV from my GCS bucket and writes it to a BigQuery table, then submit it as a Dataproc Serverless batch.

Frequently Asked Questions about gcp-spark

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a PySpark script on Dataproc Serverless?▼

Submit the script with gcloud dataproc batches submit pyspark, specifying --project, --region, --version=2.3, and --deps-bucket pointing to a GCS path for dependencies. Expect initial execution to take 10-15 minutes, which is normal behavior.

How to read and write BigLake Iceberg tables with Spark?▼

Configure the Spark session with the Iceberg REST catalog pointing to https://biglake.googleapis.com/iceberg/v1/restcatalog, choosing GCSFileIO or S3FileIO based on the table's metadataPath. Read with spark.read.format("iceberg") and write using the DataFrameWriterV2 writeTo API with modes like append or createOrReplace.

Can I use LightGBM on Dataproc Serverless?▼

LightGBM has dependency conflicts on Dataproc Serverless because the SynapseML wrapper clashes with Dataproc's internal libraries. Alternatives include XGBoost with SparkXGBClassifier, native Spark ML like GBTClassifier, or training on Vertex AI or a dedicated Dataproc cluster.

Why does my Spark job fail when writing to an Iceberg table?▼

Common causes include the DataFrame schema not matching the target table, the catalog not being set with spark.catalog.setCurrentCatalog, or the namespace not existing. Verify schemas with df.printSchema() and create the namespace with CREATE NAMESPACE IF NOT EXISTS before writing.

When should I not use Spark on Dataproc?▼

Avoid it for generic Python scripts that do not use Spark and for simple SQL queries that can run directly in BigQuery. Dataproc is intended for distributed Spark ETL, ML workloads, and large-scale data processing.