webmacro

Load DuckDB Macros from the web

Maintainer(s): lmangani

Installing and Loading

INSTALL webmacro FROM community;
LOAD webmacro;

Example

-- Create a DuckDB Scalar or Table macro statement and save it to a gist;
-- Load your remote macro onto your system using the gist url
D SELECT load_macro_from_url('https://gist.githubusercontent.com/lmangani/518215a68e674ac662537d518799b893/raw/5f305480fdd7468f4ecda3686011bab8e8e711bf/bsky.sql') 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) │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

About webmacro

The HTTP Client Extension is experimental, use at your own risk!

Added Functions

function_name function_type description comment examples
load_macro_from_url scalar NULL NULL

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.