using-duckdb

Query Fabric lakehouse and warehouse Delta tables using DuckDB locally or in notebooks.

6|3|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill using-duckdb-insightfulanalytics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-duckdb
Source: https://github.com/InsightfulAnalytics/PBI_Agentic_Dev/tree/main/plugins/etl/skills/using-duckdb
Command: npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill using-duckdb-insightfulanalytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, and includes references (resource) components.

What problem does it solve? Analysts and engineers working with Microsoft Fabric often need fast, ad-hoc access to lakehouse and warehouse data without spinning up Spark jobs or writing full pipelines. This Skill lets you query Delta tables and raw files in OneLake directly with DuckDB, either from your local machine or inside a Fabric notebook. ## Core Features & Use Cases - Local DuckDB querying: Connect to OneLake over ABFS using Azure CLI credentials and run SQL against Delta tables, CSV, Parquet, and JSON files with glob pattern support. - In-notebook attachment: Attach DuckDB to a lakehouse inside a Fabric notebook using a storage token, auto-discover all Delta tables as views, and write results back through Spark. - Common analytical patterns: Run data freshness checks, data quality validation, schema discovery, cross-table joins, and row count audits with ready-made SQL templates. - Use Case: You want to verify that yesterday's orders table loaded correctly. Use this Skill to run a freshness check and row count audit against the lakehouse in seconds, without starting a Spark session. ## Quick Start Ask the agent to use DuckDB to query the top rows of a Delta table in your Fabric lakehouse and check its data freshness.

Frequently Asked Questions about using-duckdb

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

FAQPage Schema
How do I query a Fabric lakehouse with DuckDB locally?▼

Install DuckDB with the delta and azure extensions, authenticate with az login, then create a secret using the credential_chain provider with CHAIN 'cli'. Query tables via delta_scan against the abfss:// OneLake path of your lakehouse.

How to attach DuckDB to a lakehouse inside a Fabric notebook?▼

Get a storage token with notebookutils.credentials.getToken('storage'), create a DuckDB secret of type AZURE with that access token, then run delta_scan against the lakehouse ABFS path. You can auto-discover all tables by globbing _delta_log files.

Can DuckDB write data back to a Fabric lakehouse?▼

No, DuckDB access to OneLake Delta tables is read-only in this workflow. To persist results, convert the DuckDB output to a pandas DataFrame, create a Spark DataFrame, and write it with spark_df.write.saveAsTable.

Why does DuckDB fail to authenticate to OneLake locally?▼

Without CHAIN 'cli' in the secret definition, DuckDB tries managed identity first, which fails on local machines. Explicitly set PROVIDER credential_chain with CHAIN 'cli' so it uses your Azure CLI login.

Does the Fabric storage token for DuckDB expire?▼

Yes, storage tokens expire after roughly 60 minutes. For long notebook sessions, request a new token and recreate the DuckDB secret with the refreshed access token.