Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL webmacro FROM community;
LOAD webmacro FROM community;
Try it in a temporary SQL session with webmacro already loaded. Queries run in this tab; examples using files or services need their own setup.
Using upstream DuckDB? Follow the maintainerβs installation instructions.
Usage example
Create a DuckDB Scalar or Table macro statement and save it to a gist;
-- 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 β
β varchar β varchar β varchar β β int64 β int64 β int64 β int64 β
ββββββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββΌββββΌββββββββββΌββββββββββΌββββββββΌβββββββββ€
β qxip.bsky.social β qxip β This is super coolβ¦ β β¦ β 1 β 0 β 1 β 0 β
β qxip.bsky.social β qxip β github.com/quackscβ¦ β β¦ β 0 β 1 β 2 β 0 β
β qxip.bsky.social β qxip β #DuckDB works greaβ¦ β β¦ β 2 β 3 β 24 β 0 β
β qxip.bsky.social β qxip β github.com/quackscβ¦ β β¦ β 1 β 0 β 0 β 0 β
β qxip.bsky.social β qxip β The latest #Quackpβ¦ β β¦ β 0 β 0 β 2 β 0 β
β qxip.bsky.social β qxip β The #DuckDB Ecosysβ¦ β β¦ β 0 β 0 β 5 β 0 β
β qxip.bsky.social β qxip β Ladies and Gents, β¦ β β¦ β 1 β 0 β 4 β 0 β
ββββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββ΄ββββ΄ββββββββββ΄ββββββββββ΄ββββββββ΄βββββββββ€
β 7 rows 9 columns (7 shown) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Provided by quackscience. Not yet verified on Haybarn 2.0.0.
Sample data & setupDocumentation and resources
Project and build details
- Repository
- quackscience/duckdb-extension-webmacro
- License
- MIT
- Maintainers
- lmangani, rustyconover
- Written in
- C++
- Build source
4acef9dd0bc2- Build definition
- Community descriptor