dataproc-spark-analytics
Skill2 starsChanged 28 days agoApache-2.0View on GitHub
Deploys and tunes Google Cloud Dataproc Serverless Spark, PySpark batch pipelines, BigLake vector indexing, and Data Agent Kit telemetry.
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- everything-gemini-maintainerSkill
- adversarial-fuzz-generatorSkill
- agent-evalsSkill
- ai-first-engineeringSkill
- alloydb-omni-vectorSkill
- apache-kafka-streamsSkill
- api-craftsmanSkill
- architecture-designerSkill
- argon-3d-game-engineSkill
- argon-3d-scene-architectSkill
- argon-procedural-asset-generatorSkill
- argon-visual-critique-loopSkill
- argo-workflowsSkill
- autonomous-incident-healerSkill
- axum-web-serviceSkill
- bigquery-vector-searchSkill
- browser-qa-testerSkill
- chromadb-vector-storeSkill
- cilium-ebpf-networkingSkill
- clickhouse-analyticsSkill
- cloud-deploy-canarySkill
- cloudflare-r2-object-storageSkill
- cloudflare-workersSkill
- cloud-run-agentsSkill
- context-cachingSkill
- context-distillation-compressorSkill
- context-warmerSkill
- continuous-learningSkill
- cost-oracle-finopsSkill
- cross-repo-swarm-syncSkill
- cve-remediation-orchestratorSkill
- database-architectSkill
- dbt-transformationSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- duckdb-local-olapSkill
- dynamic-thinking-allocationSkill
- ebpf-microvm-sandboxSkill
- ebpf-sandbox-enforcerSkill
- elephant-goldfish-modelSkill
- envoy-ai-gatewaySkill
- ephemeral-swarm-orchestratorSkill
- fastapi-productionSkill
- fullstack-nextjsSkill
- game-audio-synthesizerSkill
- game-studioSkill
- gemini-function-callingSkill
- gemini-groundingSkill
- gemini-live-audio-transcriberSkill
- gemini-live-multimodalSkill
- gemini-live-screen-visionSkill
- gemini-multimodalSkill
- genetic-prompt-cross-pollinatorSkill
- git-craftsmanSkill
- github-opsSkill
- google-axSkill
- google-flow-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 99
Avoid
collect(): Never pull multi-gigabyte DataFrames onto the driver.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dataproc Spark Analytics
Orchestrates large-scale distributed data processing, feature engineering, and high-throughput vector embedding generation using Google Cloud Dataproc Serverless Spark and PySpark.
1. Architecture: Dataproc Serverless & Agentic Big Data
Google Cloud Storage / BigLake Dataproc Serverless Gemini Vector Index
┌─────────────────────────────┐ ┌────────────────────────┐ ┌────────────────────────┐
│ Raw Document Lakes │────>│ Serverless PySpark │────>│ BigQuery Vector Search │
│ (Parquet, JSON, Delta/Ice) │ │ Batch Executors │ │ / Milvus / ChromaDB │
└─────────────────────────────┘ └───────────┬────────────┘ └────────────────────────┘
│
┌───────────▼────────────┐
│ Gemini Embedding API │
│ (text-embedding-004) │
└────────────────────────┘- Zero Cluster Management: Runs ad-hoc PySpark workloads without provisioning or maintaining dedicated VMs.
- Dynamic Autoscaling: Scales Spark executors elastically based on partition backlog and shuffle pressure.
- Unified Governance: Native IAM Workload Identity federation and BigLake fine-grained column/row security.
2. Distributed Vector Embedding Pipeline (PySpark)
Generates 768-dimensional embeddings over millions of technical documents using PySpark pandas UDFs:
from pyspark.sql import SparkSession
from pyspark.sql.functions import pandas_udf
from pyspark.sql.types import ArrayType, FloatType
import pandas as pd
from typing import Iterator
spark = SparkSession.builder \
.appName("Antigravity-Distributed-Embeddings") \
.config("spark.sql.execution.arrow.pyspark.enabled", "true") \
.getOrCreate()
# Read partitioned documents from Cloud Storage
docs_df = spark.read.parquet("gs://antigravity-data-lake/documents/v2/*.parquet")
@pandas_udf(ArrayType(FloatType()))
def compute_gemini_embeddings_udf(text_series: pd.Series) -> pd.Series:
"""Computes embeddings in vectorized batches using official Google GenAI SDK."""
from google import genai
client = genai.Client()
results = []
# Batch requests in 100 items per API call
batch_size = 100
for i in range(0, len(text_series), batch_size):
chunk = text_series.iloc[i:i + batch_size].tolist()
resp = client.models.embed_content(
model="text-embedding-004",
contents=chunk
)
results.extend([e.values for e in resp.embeddings])
return pd.Series(results)
# Transform and write to BigLake table
embedded_df = docs_df.withColumn("embedding", compute_gemini_embeddings_udf("content"))
embedded_df.write \
.format("bigquery") \
.mode("overwrite") \
.option("table", "enterprise_rag.document_embeddings_v2") \
.save()3. Submitting Serverless PySpark Batches
Submits serverless batch jobs via Google Cloud CLI:
gcloud dataproc batches submit pyspark gs://antigravity-artifacts/scripts/generate_embeddings.py \
--project=my-gcp-ai-project \
--region=us-central1 \
--batch=batch-emb-$(date +%s) \
--deps-bucket=gs://antigravity-artifacts/staging \
--properties=spark.dynamicAllocation.maxExecutors=30 \
--version=2.24. PySpark Performance Tuning Rules
- Avoid
collect(): Never pull multi-gigabyte DataFrames onto the driver. Use.writedirectly to BigQuery or GCS. - Optimize Partition Sizing: Aim for 128 MB – 256 MB per Spark partition:
df = df.repartition(100, "category_id") - Broadcast Small Reference Maps:
from pyspark.sql.functions import broadcast joined_df = large_fact_df.join(broadcast(small_metadata_df), "tenant_id")
5. Verification and Monitoring
# Check status of submitted batch
gcloud dataproc batches describe <BATCH_ID> --region=us-central1 --format="value(state)"
# Stream driver logs
gcloud dataproc batches wait <BATCH_ID> --region=us-central1Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

