Parse and analyze test results, build outputs, and CI/CD pipeline logs from 45+ development tools with dynamic regexp patterns
Installing and Loading
INSTALL duck_hunt FROM community;
LOAD duck_hunt;
Example
-- Parse build errors
SELECT file_path, line_number, message
FROM read_duck_hunt_log('build.log', 'auto')
WHERE status = 'ERROR';
-- Parse test results
SELECT test_name, status, execution_time
FROM read_duck_hunt_log('pytest.json', 'pytest_json')
WHERE status = 'FAIL';
-- Custom regex pattern
SELECT severity, message
FROM parse_duck_hunt_log(
'ERROR: Connection failed\nWARNING: Retrying...',
'regexp:(?P<severity>ERROR|WARNING):\s+(?P<message>.+)'
);
-- Build health badge
SELECT status_badge(
COUNT(*) FILTER (WHERE status = 'ERROR'),
COUNT(*) FILTER (WHERE status = 'WARNING')
) FROM read_duck_hunt_log('build.log', 'auto');
About duck_hunt
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 45+ tools and formats.
See: https://github.com/teaguesterling/duck_hunt/blob/main/docs/field_mappings.md
Core Table Functions:
read_duck_hunt_log(file, format)- Parse tool outputs from filesparse_duck_hunt_log(content, format)- Parse tool outputs from stringsread_duck_hunt_workflow_log(file, format)- Parse CI/CD workflow logs from filesparse_duck_hunt_workflow_log(content, format)- Parse CI/CD workflow logs from strings
Scalar Functions:
status_badge(status)- Convert status to badge: [ OK ], [FAIL], [WARN], [ .. ], [ ?? ]status_badge(errors, warnings)- Compute badge from countsstatus_badge(errors, warnings, is_running)- Badge with running state
Supported Formats (45+): See: https://github.com/teaguesterling/duck_hunt/blob/main/docs/formats.md
- Dynamic:
regexp:<pattern>- 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, and more
- Build Systems: CMake, Make, Maven, Gradle, Cargo, MSBuild, Node.js, Python
- CI/CD Engines: GitHub Actions, GitLab CI, Jenkins, Docker
- Debugging: Valgrind, GDB/LLDB
Schema Fields (38): See: https://github.com/teaguesterling/duck_hunt/blob/main/docs/schema.md
- Core: event_id, tool_name, event_type, file_path, line_number, column_number, status, severity, message
- Error Analysis: error_fingerprint, similarity_score, pattern_id, root_cause_category
- Workflow: workflow_name, job_name, step_name, workflow_status, job_status, step_status, duration
Key Features:
- Automatic format detection
- Error pattern clustering and fingerprinting
- Root cause categorization (network, permission, config, syntax, build, resource)
- Multi-file glob processing with Hive-style paths
- 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.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| duck_hunt_formats | table | NULL | NULL | |
| parse_duck_hunt_log | table | NULL | NULL | |
| parse_duck_hunt_workflow_log | table | NULL | NULL | |
| read_duck_hunt_log | table | NULL | NULL | |
| read_duck_hunt_workflow_log | table | NULL | NULL | |
| status_badge | scalar | NULL | NULL |