write-script-duckdb

Write parameterized DuckDB queries with $name variable definitions.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-duckdb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-duckdb
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-duckdb
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-duckdb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write parameterized DuckDB queries.

Core Features & Use Cases

  • Parameterized SQL templates with $variable support
  • Ducklake integration for data lake reads
  • External database attachments for cross-system queries
  • Use cases include ad-hoc analytics, data munging, and report generation

Quick Start

Create a DuckDB SQL script with parameter placeholders, define variables using comments, and run the Windmill commands to generate metadata and deploy.

Frequently Asked Questions about write-script-duckdb

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

FAQPage Schema
How do I write parameterized DuckDB queries with variables?

Parameterized DuckDB queries use the $variable syntax for placeholders. Define variables in script comments, then reference them in your SQL using $name. This prevents SQL injection and makes queries reusable across different input values.

Can I query external databases and data lakes with DuckDB?

Yes. DuckDB supports external database attachments for cross-system queries and integrates with Ducklake for data lake reads. This lets you join and analyze data across local files, external databases, and cloud data sources in a single script.

What are common use cases for parameterized SQL queries?

Parameterized SQL templates work for ad-hoc analytics, data munging, and report generation. They're especially useful when you need to run the same query logic repeatedly with different filter values or time ranges without rewriting the script.

Do I need prior SQL knowledge to use DuckDB queries?

You should be comfortable writing SQL. DuckDB uses standard SQL syntax, so experience with relational databases helps. The Skill handles parameterization and external data attachment; you provide the query logic.

How do parameterized queries improve security in data workflows?

Parameterized queries separate query logic from data values, preventing SQL injection attacks. Variables defined using $name syntax are safely escaped, making parameterized templates safer than string concatenation for dynamic queries.

Can parameterized DuckDB queries work with local CSV and Parquet files?

Yes. DuckDB natively reads CSV, Parquet, and other formats from local storage. Parameterized queries let you reference these files dynamically, making it easy to process multiple files or apply consistent logic across different datasets.