duckdb-local-olap
Skill2 starsChanged 29 days agoApache-2.0View on GitHub
Architects, queries, and optimizes embedded in-process DuckDB analytical workflows, direct Parquet/S3 querying, zero-copy Apache Arrow dataframes, and MotherDuck hybrid cloud execution.
- Reads credentials
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
- dataproc-spark-analyticsSkill
- dbt-transformationSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- 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
2 rules. About 0 are common, 0 are distinctive, and 2 are 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 133
Configure Memory Limit: Always set SET memory_limit = 'XGB'.
- Very specific: line 134
Avoid Row-by-Row Inserts: Use Appender or COPY ... FROM ...
≈ “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
DuckDB Local OLAP & Serverless Analytics
This skill guides building high-speed analytical engines using DuckDB—the "SQLite for analytics"—enabling columnar vectorized execution, direct querying of compressed Parquet files on cloud storage, and zero-copy transfers with Apache Arrow.
⚡ Core Patterns
1. Direct Parquet Querying Over S3 Without Ingestion
Query gigabytes of remote compressed files with projection and predicate pushdowns (only requested byte ranges are transferred over the network):
-- 1. Install and load HTTP and S3 extensions
INSTALL httpfs;
LOAD httpfs;
-- 2. Configure S3 authentication
SET s3_region = 'us-east-1';
SET s3_access_key_id = 'YOUR_ACCESS_KEY';
SET s3_secret_access_key = 'YOUR_SECRET_KEY';
-- 3. Query remote Parquet directory with globs
SELECT
country,
count(*) AS total_transactions,
round(avg(amount_usd), 2) AS avg_amount,
quantile_cont(amount_usd, 0.95) AS p95_amount
FROM read_parquet('s3://my-data-lake/transactions/year=2026/month=*/*.parquet')
WHERE status = 'settled'
GROUP BY country
ORDER BY total_transactions DESC
LIMIT 20;2. Zero-Copy Python & Polars / Arrow Integration
Pass memory buffers directly between DuckDB's vectorized engine and Polars or PyArrow without JSON or IPC serialization:
import duckdb
import polars as pl
# Connect to in-memory instance
con = duckdb.connect()
# Set aggressive memory limits and worker threads
con.execute("SET memory_limit = '8GB';")
con.execute("SET threads = 8;")
# Create a sample Polars DataFrame
df = pl.DataFrame({
"user_id": [101, 102, 103],
"scores": [98.5, 76.2, 89.0]
})
# Query Polars DataFrame directly as a virtual table (zero-copy)
arrow_table = con.execute("""
SELECT
user_id,
scores,
CASE WHEN scores >= 90 THEN 'A' ELSE 'B' END AS grade
FROM df
WHERE scores > 80
""").arrow()
# Convert back to Polars instantaneously
result_df = pl.from_arrow(arrow_table)
print(result_df)3. Node.js Embedded Analytics Engine
import { Database } from 'duckdb-async';
export async function aggregateLocalParquet(parquetPath: string) {
const db = await Database.create(':memory:');
const rows = await db.all(`
SELECT
category,
count(*) AS item_count,
sum(price) AS gross_revenue
FROM read_parquet(?)
GROUP BY category
ORDER BY gross_revenue DESC
`, [parquetPath]);
await db.close();
return rows;
}4. MotherDuck Cloud Hybrid Execution
Scale seamlessly from a single laptop to collaborative cloud storage without modifying SQL queries:
import duckdb
# Connect to MotherDuck (cloud database)
con = duckdb.connect("md:production_analytics")
# Join local disk Parquet files directly with MotherDuck cloud tables
con.execute("""
SELECT
cloud_users.organization_id,
count(local_events.event_id) AS event_volume
FROM read_parquet('./local_cache/*.parquet') AS local_events
JOIN cloud_users ON local_events.user_id = cloud_users.id
GROUP BY cloud_users.organization_id
""")🛠️ Performance Checklist
- Use Parquet Over CSV: Parquet is 10x-50x faster due to columnar compression, statistics dictionaries, and column skipping.
- Configure Memory Limit: Always set
SET memory_limit = 'XGB';to ensure DuckDB uses external sorting/joining when data exceeds RAM instead of crashing the process. - Avoid Row-by-Row Inserts: Use
AppenderorCOPY ... FROM ...in bulk batches of 50,000+ rows.
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.

