--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: maxmind excerpt: | DuckDB Community Extensions Read MaxMind databases (GeoLite, GeoIP, and more) extension: name: maxmind description: Read MaxMind databases (GeoLite, GeoIP, and more) version: 0.12.0 language: Zig build: cmake license: ISC excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads" maintainers: - marselester repo: github: marselester/duckdb-maxmind ref: 08a80d772143c083c160ebd846642ecac1ef035c docs: hello_world: | SELECT geolite_city('./GeoLite2-City.mmdb', '1.0.64.0', ''); extended_description: | 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. ```sql SELECT network, city.names.en FROM read_mmdb('./GeoLite2-City.mmdb') WHERE city.names.en IS NOT NULL LIMIT 1; ┌─────────────┬───────────┐ │ network │ en │ ├─────────────┼───────────┤ │ 1.0.64.0/20 │ Hiroshima │ └─────────────┴───────────┘ ``` Look up a record by IP address with typed scalar functions that return structs. The third parameter filters which fields to decode for faster lookups (pass `''` for all fields). ```sql SELECT geolite_city('./GeoLite2-City.mmdb', '1.0.64.0', 'city').city.names.en AS en; ┌───────────┐ │ en │ ├───────────┤ │ Hiroshima │ └───────────┘ ``` Use `mmdb_record()` to look up a record from any MMDB file as JSON: ```sql SELECT mmdb_record('./GeoLite2-City.mmdb', '1.0.64.0', 'city') -> 'city' -> 'names' ->> 'en' AS en; ┌───────────┐ │ en │ ├───────────┤ │ Hiroshima │ └───────────┘ ``` extension_star_count: 9 extension_star_count_pretty: 9 extension_download_count: 962 extension_download_count_pretty: 962 image: '/images/community_extensions/social_preview/preview_community_extension_maxmind.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 | |-------------------------|---------------|-------------|---------|----------| | extension_version | scalar | NULL | NULL | | | geoip_anonymous_ip | scalar | NULL | NULL | | | geoip_anonymous_plus | scalar | NULL | NULL | | | geoip_city | scalar | NULL | NULL | | | geoip_connection_type | scalar | NULL | NULL | | | geoip_country | scalar | NULL | NULL | | | geoip_densityincome | scalar | NULL | NULL | | | geoip_domain | scalar | NULL | NULL | | | geoip_enterprise | scalar | NULL | NULL | | | geoip_ip_risk | scalar | NULL | NULL | | | geoip_isp | scalar | NULL | NULL | | | geoip_regions | scalar | NULL | NULL | | | geoip_residential_proxy | scalar | NULL | NULL | | | geoip_static_ip_score | scalar | NULL | NULL | | | geoip_user_count | scalar | NULL | NULL | | | geolite_asn | scalar | NULL | NULL | | | geolite_city | scalar | NULL | NULL | | | geolite_country | scalar | NULL | NULL | | | mmdb_record | scalar | NULL | NULL | | | read_mmdb | table | 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 |