DuckDB WebMacro Extension

February 18, 2026 · View on GitHub

DuckDB WebMacro Extension

This extension allows loading DuckDB Macros (both scalar and table) from URLs, gists, pasties, etc.

Installation

INSTALL webmacro FROM community;
LOAD webmacro;

Usage

Create a DuckDB SQL Macro and save it somewhere. Here's an example

Load your remote macro onto your system using a URL:

SELECT load_macro_from_url('https://quacks.cc/r/search_posts') as res;
┌─────────────────────────────────────────┐
│                   res                   │
varchar
├─────────────────────────────────────────┤
│ Successfully loaded macro: search_posts │
└─────────────────────────────────────────┘

Use your new macro and have fun:

D SELECT * FROM search_posts('qxip.bsky.social', text := 'quack');
┌──────────────────┬──────────────┬──────────────────────┬───┬─────────┬─────────┬───────┬────────┐
│  author_handle   │ display_name │      post_text       │ … │ replies │ reposts │ likes │ quotes │
varcharvarcharvarchar        │   │  int64  │  int64  │ int64 │ int64  │
├──────────────────┼──────────────┼──────────────────────┼───┼─────────┼─────────┼───────┼────────┤
qxip.bsky.social │ qxip         │ This is super cool…  │ … │       1010
qxip.bsky.social │ qxip         │ github.com/quacksc…  │ … │       0120
qxip.bsky.social │ qxip         │ #DuckDB works grea…  │ … │       23240
qxip.bsky.social │ qxip         │ github.com/quacksc…  │ … │       1000
qxip.bsky.social │ qxip         │ The latest #Quackp…  │ … │       0020
qxip.bsky.social │ qxip         │ The #DuckDB Ecosys…  │ … │       0050
qxip.bsky.social │ qxip         │ Ladies and Gents, …  │ … │       1040
├──────────────────┴──────────────┴──────────────────────┴───┴─────────┴─────────┴───────┴────────┤
7 rows                                                                      9 columns (7 shown) │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

Example

webmacro_example