--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: duck_hunt excerpt: | DuckDB Community Extensions Parse and analyze test results, build outputs, and CI/CD pipeline logs from 110+ formats with severity filtering, format auto-detection, and context extraction extension: name: duck_hunt description: Parse and analyze test results, build outputs, and CI/CD pipeline logs from 110+ formats with severity filtering, format auto-detection, and context extraction version: 1.14.0 language: C++ build: cmake license: Apache-2.0 # Windows excluded: duckdb's vendored fmt (third_party/fmt) fails to compile on # the build runner's MSVC (stdext::checked_array_iterator removed). Upstream # issue, not duck_hunt code; no Windows artifact has ever been published for # this extension. Revisit when duckdb ships a newer vendored fmt. excluded_platforms: "windows_amd64;windows_amd64_mingw" maintainers: - teaguesterling repo: github: teaguesterling/duck_hunt andium: 68ca1c4676f706980a6503c19b789f5224596b4d ref: 72149b4fdabdfbf4bb231c81123832c428cc93a3 # variegata pins the v1.5.6 track. scripts/build.py sends a v1.5.6 build here when # present and to `ref` otherwise, and unlike ref_next it has no skip branch -- so # once `ref` is 2.0-only a v1.5.6 build would fail rather than be skipped. Equal to # `ref` while both lines build; advance only to a commit v1.5.6 can still build. variegata: 72149b4fdabdfbf4bb231c81123832c428cc93a3 # ref_next == ref (deliberate): validate the shipped release on v2.0-cyanoptera # rather than skipping it. # # v1.14.0 (tag v1.14.0) RESTORES the v2.0 build. Cyanoptera made the # ParserOptions default constructor private, which broke # `Parser parser;` in duck_hunt_macros.cpp (it reaches ParserOptions() through a # defaulted argument). The v2.0 line had not compiled since dd06255, and the leg # was advisory, so main read green while that build was dead. v1.14.0 switches to # cyanoptera's public context-free Parser::GetBuiltinParser(). Both v2.0 legs # (linux_amd64, osx_arm64) are green on this exact commit, alongside 14 gating # legs and 3794 assertions across 61 test files on the stable line. # # NOTE for whoever edits this next: the PREVIOUS ref_next comment claimed v2.0 # "BUILDS AND TESTS on this exact commit", and that was TRUE when written # (2026-10-04, run 37180096622 green at 60f840ae). It became false on 2026-10-05 # when cyanoptera privatised ParserOptions. A ref_next claim has a shelf life: # the next-line branch moves under a pinned ref, so "verified green" ages into # "was green once". Re-check against a current cyanoptera leg before trusting it. ref_next: 72149b4fdabdfbf4bb231c81123832c428cc93a3 docs: readme: https://duck-hunt.readthedocs.io/ hello_world: | -- Parse build errors (warnings and above) SELECT ref_file, ref_line, message FROM read_duck_hunt_log('build.log', 'auto', severity_threshold := 'warning') WHERE status = 'ERROR'; -- Parse test results with all events SELECT test_name, status, execution_time FROM read_duck_hunt_log('pytest.json', 'pytest_json', severity_threshold := 'all') WHERE status = 'FAIL'; -- Process multiple files, skip failures (new in v1.4.0) SELECT * FROM read_duck_hunt_log('logs/*.json', ignore_errors := true); -- Control log_content size for memory efficiency (new in v1.4.0) SELECT * FROM read_duck_hunt_log('huge.log', content := 200); SELECT * FROM read_duck_hunt_log('huge.log', content := 'smart'); -- Extract surrounding log lines for context (new in v1.6.0) SELECT ref_file, message, context FROM read_duck_hunt_log('build.log', 'make_error', context := 3); -- Parse GitHub Actions ZIP archives (new in v1.4.0, requires zipfs) -- INSTALL zipfs FROM community; LOAD zipfs; SELECT job_name, severity, message FROM read_duck_hunt_workflow_log('workflow_run.zip', 'github_actions_zip') WHERE severity = 'error'; -- Debug format detection SELECT format, can_parse, events_produced, is_selected FROM duck_hunt_diagnose_read('build.log'); -- LATERAL join for per-file parsing (new in v1.7.0) SELECT f.filename, e.* FROM glob('logs/*.log') f, LATERAL read_duck_hunt_log(f.filename) e; -- Comma-separated format fallback chain (new in v1.9.0) SELECT ref_file, ref_line, message FROM read_duck_hunt_log('build.log', 'gcc_text,make_error,cmake_build'); -- Load custom parser from config file (new in v1.8.0) SELECT duck_hunt_load_parser_config('my_parser.yml'); -- Build health badge SELECT status_badge( COUNT(*) FILTER (WHERE status = 'ERROR'), COUNT(*) FILTER (WHERE status = 'WARNING') ) FROM read_duck_hunt_log('build.log', 'auto'); extended_description: | Duck Hunt is a comprehensive DuckDB extension for parsing and analyzing development tool outputs. It provides a unified SQL interface to query test results, build logs, linting output, and CI/CD pipeline data from 90+ tools and formats. **Documentation:** **Core Table Functions:** - `read_duck_hunt_log(source, format, severity_threshold, ignore_errors, content, context)` - Parse tool outputs from files - `parse_duck_hunt_log(text, format, severity_threshold, content, context)` - Parse tool outputs from strings - `read_duck_hunt_workflow_log(source, format, severity_threshold, ignore_errors)` - Parse CI/CD workflow logs - `parse_duck_hunt_workflow_log(text, format, severity_threshold)` - Parse workflow strings **New in v1.9.0:** - Comma-separated format strings - Try multiple parsers in order (e.g., `'gcc_text,make_error'`) - Fuzzy format name suggestions - Typos get helpful "Did you mean?" errors - Pytest parser enrichment fix - Actual assertion errors instead of "Test failed" - Pytest dedup - One event per failure instead of duplicates from inline+summary - function_name extraction for pytest test events - Parser message quality - 14 parsers fixed to include test/method names in messages **New in v1.8.0:** - Unity Test XML parser - Parse NUnit 3 format test results (requires webbed extension) - Config-based parser system - Define custom parsers via JSON config files - Unity Editor build log parser - File-based parser interface for efficient XML parsing - Security hardening - Path traversal prevention, 100MB file size limits - Performance - Static regex patterns, thread-safe ParserRegistry **New in v1.7.0:** - LATERAL join support for `read_duck_hunt_log` and `parse_duck_hunt_log` - Streaming parser support for large files - `ruff_json` parser for Ruff Python linter JSON output - `include_unparsed` parameter for regexp parser debugging - Improved DuckDB test parser with better failure extraction - Line ending normalization (CRLF/CR support) **New in v1.6.0:** - `context` parameter - Include N surrounding log lines around each event - Context column type: `LIST(STRUCT(line_number INT, content VARCHAR, is_event BOOL))` - Works with all parsers and combines with other parameters **New in v1.5.0:** - Format groups: Use `python`, `javascript`, `lint`, `test`, `build` etc. for auto-detection - 14 formats promoted to Production maturity (205 new test assertions) - Cleaner codebase: 37 parsers migrated to DelegatingParser template **New in v1.4.0:** - `ignore_errors` parameter - Continue processing when individual files fail - `content` parameter - Control log_content size: integer limit, `'smart'`, `'none'`, or `'full'` - `github_actions_zip` format - Parse ZIP archives from GitHub Actions (requires zipfs extension) - Workflow delegation - Workflow parsers auto-delegate to tool parsers (make, pytest, etc.) **Diagnostic Functions:** - `duck_hunt_detect_format(content)` - Auto-detect format, returns format name or NULL - `duck_hunt_diagnose_read(path)` - Debug which parsers match a file - `duck_hunt_diagnose_parse(content)` - Debug which parsers match content - `duck_hunt_formats()` - List all supported formats with priorities **Scalar Functions:** - `status_badge(status)` - Convert status to badge: [ OK ], [FAIL], [WARN], [ .. ], [ ?? ] - `status_badge(errors, warnings)` - Compute badge from counts - `status_badge(errors, warnings, is_running)` - Badge with running state **Severity Filtering:** Filter events by severity level: `'all'` < `'info'` < `'warning'` < `'error'` < `'critical'` **Supported Formats (110+):** See: - **Dynamic:** `regexp:` - Custom patterns with named capture groups - **Test Frameworks:** pytest, Go test, Cargo test, JUnit, RSpec, Mocha/Chai, Google Test, NUnit/xUnit - **Linting Tools:** ESLint, RuboCop, Pylint, Flake8, MyPy, Clippy, SwiftLint, PHPStan, isort, and more - **Build Systems:** CMake, Make, Maven, Gradle, Cargo, MSBuild, Node.js, Python, Spack - **CI/CD Engines:** GitHub Actions, GitLab CI, Jenkins, Docker, Drone CI, Terraform - **Distributed Systems:** HDFS, Spark, Zookeeper, OpenStack, Android, Blue Gene/L - **Infrastructure:** Kubernetes, AWS CloudTrail, VPC Flow, S3 Access, Syslog - **Debugging:** Valgrind, GDB/LLDB, strace **Schema Fields (39):** See: - Reference context: ref_file, ref_line, ref_column (locations mentioned in logs) - Log source: log_file, log_content, log_line_start, log_line_end - Core: event_id, tool_name, event_type, status, severity, message - Error Analysis: fingerprint, similarity_score, pattern_id - Hierarchy: scope, group, unit, subunit (and corresponding _id, _status fields) **Key Features:** - Automatic format detection with diagnostic debugging - Transparent compression support (GZIP built-in, ZSTD via parquet) - GitHub Actions ZIP archive support (via zipfs extension) - Severity-based event filtering - Context extraction for surrounding log lines - Error pattern clustering and fingerprinting - Multi-file glob processing with ignore_errors for robust batch processing - Memory-efficient content modes (limit, smart truncation, omit) - Workflow delegation to tool-specific parsers - Pipeline integration with stdin support - Hierarchical CI/CD workflow parsing Perfect for CI/CD analysis, automated debugging, test aggregation, quality gates, and agent-driven development workflows. extension_star_count: 8 extension_star_count_pretty: 8 extension_download_count: 1065 extension_download_count_pretty: 1.1k image: '/images/community_extensions/social_preview/preview_community_extension_duck_hunt.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Linux ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ✅ | ❌ | ✅ | ✅ | ✅ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |----------------------------------|---------------|---------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------| | duck_hunt_detect_format | scalar | Detect the log format of a text sample. | NULL | [duck_hunt_detect_format('=== RUN TestFoo')] | | duck_hunt_diagnose_parse | table | Diagnose log parsing issues for string content across all known format parsers. | NULL | [SELECT * FROM duck_hunt_diagnose_parse('sample log content')] | | duck_hunt_diagnose_read | table | Diagnose log parsing issues for a log file path across all known format parsers. | NULL | [SELECT * FROM duck_hunt_diagnose_read('build.log')] | | duck_hunt_formats | table | List all supported log and test output formats in duck_hunt. | NULL | [SELECT * FROM duck_hunt_formats()] | | duck_hunt_load_parser_config | scalar | Load a dynamic JSON parser configuration into duck_hunt. | NULL | [duck_hunt_load_parser_config('{}')] | | duck_hunt_match_command_patterns | table_macro | NULL | NULL | | | duck_hunt_unload_parser | scalar | Unload a dynamic parser from duck_hunt. | NULL | [duck_hunt_unload_parser('custom_fmt')] | | parse_duck_hunt_log | table | Parse test and validation log text content into structured validation events. | NULL | [SELECT * FROM parse_duck_hunt_log('PASSED: test_foo')] | | parse_duck_hunt_workflow_log | table | Parse workflow log text into structured steps and events. | NULL | [SELECT * FROM parse_duck_hunt_workflow_log('##[group]Run step')] | | read_duck_hunt_log | table | Read and parse test and validation logs from files into structured validation events. | NULL | [SELECT * FROM read_duck_hunt_log('test.log')] | | read_duck_hunt_workflow_log | table | Read and parse workflow logs (GitHub Actions, GitLab CI, etc.) into steps and events. | NULL | [SELECT * FROM read_duck_hunt_workflow_log('workflow.log')] | | status_badge | scalar | Generate a status badge string from test execution status. | NULL | [status_badge('passed')] | | status_badge | scalar | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |