Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL warc FROM community;
LOAD warc FROM community;
Using upstream DuckDB? Follow the maintainerβs installation instructions.
Usage example
Parse a WARC record from a gzip-compressed file
-- Parse a WARC record from a gzip-compressed file
SELECT parse_warc(content) FROM read_blob('record.warc.gz');
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β parse_warc(content) β
β struct(warc_version varchar, warc_headers varchar, http_version varchar, β
β http_status integer, http_headers varchar, http_body blob) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β {'warc_version': '1.0', 'warc_headers': '{"WARC-Type": "response", ...}', β
β 'http_version': 'HTTP/1.1', 'http_status': 200, β
β 'http_headers': '{"content-type": "text/html", ...}', β
β 'http_body': <!doctype html>...} β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Extract specific fields
SELECT
(parse_warc(content)).http_status,
(parse_warc(content)).http_body
FROM read_blob('record.warc.gz');
Provided by midwork-finds-jobs. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
The WARC extension parses WARC (Web ARChive) records, the standard format used by Common Crawl and web archiving tools. It enables efficient processing of web archive data directly in DuckDB.
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- midwork-finds-jobs/duckdb_warc
- License
- MIT
- Maintainers
- onnimonni
- Written in
- Rust
- Build source
954cbe42e5fd- Build definition
- Community descriptor