Search Shortcut cmd + k | ctrl + k

Windows Event Log (.evtx) inspection in SQL — validate a log and count its event records straight from read_blob(), no evtxparse or plaso

Maintainer(s): alitrack

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, 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

INSTALL evtx FROM community;
LOAD evtx;

Example

INSTALL evtx FROM community;
LOAD evtx;

-- Wire it to your own logs: an .evtx file is just a BLOB
--   SELECT evtx_is_valid(read_blob('security.evtx'));
--   SELECT evtx_record_count(read_blob('security.evtx'));

-- Self-contained probe: a non-evtx blob is invalid, zero records
SELECT evtx_is_valid(CAST('not an evtx' AS BLOB));       -- false
SELECT evtx_record_count(CAST('not an evtx' AS BLOB));    -- 0

About evtx

evtx — Windows Event Log inspection in SQL

The two cheap primitives every DFIR triage starts with — is it a valid Event Log, and how many records — as SQL functions over a BLOB column.

Function Returns Notes
evtx_is_valid(bytes) BOOLEAN Magic + structure check
evtx_record_count(bytes) BIGINT Event record count (capped at 5,000,000)
evtx_parse(bytes) table One row per event record with lifted fields

→ GitHub

Added Functions

function_name function_type description comment examples
evtx_is_valid scalar NULL NULL  
evtx_record_count 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
© 2026 DuckDB Foundation, Amsterdam NL
DuckDB Home Code of Conduct Trademark Use Blog