zero-copy-ingestion
Skill135 starsChanged 6 months agoApache-2.0View on GitHub
This skill enforces the Zero-Copy Architecture of the modern Google Cloud Lakehouse. It eliminates the overhead of copying data to external compute engines or creating intermediate files (CSVs/JSONs) on GCS. It standardizes: 1. Reading from BigQuery directly into Spark DataFrames using the Spark-BigQuery connector. 2. Reading from BigQuery using BigQuery DataFrames (bigframes.pandas) for in-warehouse processing. - Spark: Managed Service for Apache Spark Serverless (Runtime 3.0+ recommended) with the Spark BigQuery Connector pre-bundled. - BigQuery: bigframes Python package installed. When generating…
In this repository20 other files it gives its agents.
- spanner-provisioningSkill
- ad-copywritingSkill
- brand-strategySkill
- platform-specsSkill
- trend-analysisSkill
- video-storytellingSkill
- visual-directionSkill
- ad-copywritingSkill
- brand-strategySkill
- platform-specsSkill
- trend-analysisSkill
- video-storytellingSkill
- visual-directionSkill
- legacy-app-generatorSkill
- ingress2gatewaySkill
- bigframes-bqmlSkill
- model-evaluationSkill
- pipeline-generatorSkill
- spark-lightning-optimizationSkill
- unified-model-registrySkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
When generating data loading or exploration code:
- Very specific: line 32
Never export to GCS first: Do not write code that exports BigQuery tables to GCS as CSV/Avro/Parquet before loading them into Spark or …
- Very specific: line 34
Use BigQuery Storage API: Ensure Spark reads use the "bigquery" format, which utilizes the high-speed BigQuery Storage Read API.
- Very specific: line 36
Use BigFrames for BQ: Ensure BigQuery-centric pipelines use bigframes.pandas.read_gbq to create references to the tables.
- Distinctive: line 43
Use the Spark-BigQuery connector to load tables directly.
- Distinctive: line 59
Use BigQuery DataFrames to create a virtual DataFrame.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Skill: Zero-Copy Data Exploration & Ingestion
<!--
Disabling markdownlint MD029 to provide explicit ordering to avoid
confusing the LLM.
--><!-- markdownlint-disable MD029 -->1. Description & Rationale
This skill enforces the Zero-Copy Architecture of the modern Google Cloud Lakehouse. It eliminates the overhead of copying data to external compute engines or creating intermediate files (CSVs/JSONs) on GCS.
It standardizes:
- Reading from BigQuery directly into Spark DataFrames using the Spark-BigQuery connector.
- Reading from BigQuery using BigQuery DataFrames (
bigframes.pandas) for in-warehouse processing.
2. Environment Prerequisites
- Spark: Managed Service for Apache Spark Serverless (Runtime 3.0+ recommended) with the Spark BigQuery Connector pre-bundled.
- BigQuery:
bigframesPython package installed.
3. Agent Execution Guidelines (System Prompts)
When generating data loading or exploration code:
- Never export to GCS first: Do not write code that exports BigQuery tables to GCS as CSV/Avro/Parquet before loading them into Spark or Pandas.
- Use BigQuery Storage API: Ensure Spark reads use the
"bigquery"format, which utilizes the high-speed BigQuery Storage Read API. - Use BigFrames for BQ: Ensure BigQuery-centric pipelines use
bigframes.pandas.read_gbqto create references to the tables.
4. Opinionated Code Patterns
A. Spark-Centric Zero-Copy Load
Use the Spark-BigQuery connector to load tables directly.
# Load BigQuery table directly into Spark DataFrame
users_df = (
spark.read.format("bigquery")
.option("table", "bigquery-public-data.thelook_ecommerce.users")
.load()
)
# Create temporary view for Spark SQL queries
users_df.createOrReplaceTempView("users")B. BigQuery-Centric Zero-Copy Load
Use BigQuery DataFrames to create a virtual DataFrame.
import bigframes.pandas as bpd
# Configure BigQuery DataFrames global options
bpd.options.bigquery.project = PROJECT_ID
bpd.options.bigquery.location = "US" # Or your dataset location
# Load table reference (zero data movement)
users_df = bpd.read_gbq("bigquery-public-data.thelook_ecommerce.users")5. Verification Checklist
- No GCS Export: Verify the code does not contain
bq extractor GCS export steps before loading. - Spark Format: Ensure the Spark read format is explicitly
"bigquery". - BigFrames Config: Ensure
bpd.options.bigquery.projectis set before callingread_gbq.
Does 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.

