Skip to content
DuckDB community extension

maxmind

Read MaxMind databases (GeoLite, GeoIP, and more)

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 maxmind FROM community;
LOAD maxmind FROM community;

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

02 / QUERY

Usage example

SQL
SELECT geolite_city('./GeoLite2-City.mmdb', '1.0.64.0', '');

Provided by marselester. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

Read any MaxMind database using table and scalar functions. GeoLite and GeoIP databases get typed columns; other MMDB files return a record JSON column.

Scan all IP network blocks with read_mmdb(). Use the optional network parameter to limit the scan to a subnet, e.g., read_mmdb(path, network='1.0.0.0/8'). Empty records are excluded by default; use include_empty=true to include them.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
marselester/duckdb-maxmind
License
ISC
Maintainers
marselester
Written in
Zig
Build source
08a80d772143
Build definition
Community descriptor