# using-duckdb

Query Delta tables and raw files in Fabric OneLake using DuckDB either on your machine or inside a Fabric notebook.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1104 repo stars
- Author: Kurt Buhler
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/etl/skills/using-duckdb/SKILL.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/using-duckdb

## What it does

The skill sets up direct SQL queries against Microsoft Fabric OneLake storage without launching heavy Spark clusters. It reads Delta Lake tables alongside raw Parquet, CSV, and JSON files stored across lakehouses and warehouses.

Execution splits into two environments. In a local terminal, DuckDB queries OneLake using Azure CLI authentication paired with the `delta` and `azure` extensions. Inside a Fabric notebook, it uses storage tokens through `notebookutils`, speeding up ad-hoc analytical queries on a single node. Cross-item joins work directly in a single SQL statement via full ABFSS paths.

This integration strictly handles read-only workloads. Writing data back into storage requires Spark, and local execution fails unless you authenticate via `az login` first.

## Requirements
- Works with: Power BI

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add data-goblin/power-bi-agentic-development
```
In the agent chat (not a shell):
```text
/plugin install etl@power-bi-agentic-development
```
This installs the whole etl plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill using-duckdb -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/using-duckdb/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/using-duckdb/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill using-duckdb -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/using-duckdb/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill using-duckdb -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/using-duckdb/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install data-goblin/power-bi-agentic-development plugins/etl/skills/using-duckdb
```

2. **Manually: put the files in place**
- File: `.github/skills/using-duckdb/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill using-duckdb -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/data-goblin/power-bi-agentic-development --path plugins/etl/skills/using-duckdb
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/using-duckdb/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/etl/skills/using-duckdb/SKILL.md

## When to use it
- query Fabric Delta tables directly from a local terminal
- run fast analytical SQL queries in Fabric notebooks without Spark SQL
- inspect raw Parquet, JSON, and CSV files stored in OneLake
- perform cross-item joins across separate lakehouses and warehouses

## Example prompts
- Query Delta tables locally with DuckDB to check row counts
- Attach DuckDB to the lakehouse in this Fabric notebook
- Scan raw parquet files in OneLake using DuckDB

## Similar
- [fabric-onelake-2025](https://affpapa.org/en/nevibecode/skills/fabric-onelake-2025.md) — skill · 161 installs
- [azure-mgmt-fabric-py](https://affpapa.org/en/nevibecode/skills/azure-mgmt-fabric-py.md) — skill · ★ 3232 repo stars
- [microsoft-fabric-unified-analytics](https://affpapa.org/en/nevibecode/skills/microsoft-fabric-unified-analytics.md) — skill · 282 installs
- [fabric-lakehouse](https://affpapa.org/en/nevibecode/skills/fabric-lakehouse.md) — skill · 8800 installs
- [duckdb-docs](https://affpapa.org/en/nevibecode/skills/duckdb-docs.md) — skill · 1500 installs
- [openduck-distributed-duckdb](https://affpapa.org/en/nevibecode/skills/openduck-distributed-duckdb.md) — skill · 431 installs

From the same set: [data-goblin/power-bi-agentic-development](https://affpapa.org/en/nevibecode/by/data-goblin/power-bi-agentic-development.md) — 59 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
