Skip to content
DuckDB community extension

gaggle

A DuckDB extension for working with Kaggle datasets

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL gaggle FROM community;
LOAD gaggle FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

0. Assuming the extension is already installed and loaded

SQL
-- 0. Assuming the extension is already installed and loaded

-- 1. Get extension version
SELECT gaggle_version();

-- 2. List files in the dataset
SELECT * FROM gaggle_ls('habedi/flickr-8k-dataset-clean', true) LIMIT 5;

-- 3. Read a Parquet file from local cache using a prepared statement
PREPARE rp as SELECT * FROM read_parquet(?) LIMIT 10;
EXECUTE rp(gaggle_file_path('habedi/flickr-8k-dataset-clean', 'flickr8k.parquet'));

-- 4. Alternatively, we can use a replacement scan to read directly via `kaggle:` prefix
SELECT COUNT(*) FROM 'kaggle:habedi/flickr-8k-dataset-clean/flickr8k.parquet';

-- 5. Check cache info
SELECT gaggle_cache_info();

-- 6. Check if cached dataset is current (is the newest version?)
SELECT gaggle_is_current('habedi/flickr-8k-dataset-clean');

Provided by CogitatorTech. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

Gaggle is a DuckDB extension that uses the Kaggle API to let you query Kaggle datasets directly with SQL. It aims to simplify the data science workflows by hiding the complexity of manually downloading, extracting, and managing dataset files from Kaggle.

For more information, like API references and usage examples, visit the project's GitHub repository.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
CogitatorTech/gaggle
License
MIT OR Apache-2.0
Maintainers
habedi
Written in
Rust & C++
Build source
a459b1bd72d0
Build definition
Community descriptor