--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: duckdb_geoip_rs excerpt: | DuckDB Community Extensions Retrieve geo ip data from MMDB database extension: name: duckdb_geoip_rs description: Retrieve geo ip data from MMDB database version: 0.3.0 language: Rust build: cmake license: MIT excluded_platforms: "windows_amd64_rtools;wasm_mvp;wasm_eh;wasm_threads;linux_amd64_musl" requires_toolchains: "rust;python3" maintainers: - william-billaud repo: github: william-billaud/duckdb-geoip-rs ref: 27c9b1f86772a5e8927c5dd6cfc0e0bf1f194ba4 docs: hello_world: | -- Before, export mmdb path : export MAXMIND_MMDB_DIR="`pwd`" INSTALL 'duckdb_geoip_rs' FROM community; LOAD 'duckdb_geoip_rs'; -- Create sample data CREATE TABLE ip_list (ip VARCHAR); INSERT INTO ip_list VALUES ('1.1.1.1'), ('8.8.8.8'), ('80.8.8.8'), ('90.9.250.1'), ('not_anip'); -- Get associated geo ip data SELECT ip, geoip_asn_org(ip),geoip_asn_num(ip),geoip_city(ip), geoip_country_iso(ip) from ip_list; ┌────────────┬───────────────────┬───────────────────┬────────────────┬───────────────────────┐ │ ip │ geoip_asn_org(ip) │ geoip_asn_num(ip) │ geoip_city(ip) │ geoip_country_iso(ip) │ │ varchar │ varchar │ varchar │ varchar │ varchar │ ├────────────┼───────────────────┼───────────────────┼────────────────┼───────────────────────┤ │ 1.1.1.1 │ Cloudflare, Inc. │ 13335 │ │ AU │ │ 8.8.8.8 │ Google LLC │ 15169 │ │ US │ │ 80.8.8.8 │ Orange │ 3215 │ Le Tampon │ RE │ │ 90.9.250.1 │ Orange │ 3215 │ Lyon │ FR │ │ not_anip │ NULL │ NULL │ NULL │ NULL │ └────────────┴───────────────────┴───────────────────┴────────────────┴───────────────────────┘ extended_description: | Path to a directory containing GeoLite2-City.mmdb and GeoLite2-ASN.mmdb files must be exported to MAXMIND_MMDB_DIR environment variable. Defaulting to /usr/share/GeoIP. This extension export 4 function using MaxminDB database: * geoip_asn_org(ip : VARCHAR)-> VARCHAR * geoip_asn_num(ip : VARCHAR)-> VARCHAR * geoip_city(ip : VARCHAR)-> VARCHAR * geoip_country_iso(ip : VARCHAR) -> VARCHAR All the function will return an empty value on empty/non found value extension_star_count: 10 extension_star_count_pretty: 10 extension_download_count: 958 extension_download_count_pretty: 958 image: '/images/community_extensions/social_preview/preview_community_extension_duckdb_geoip_rs.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 | |-------------------|---------------|----------------------------------------------------------------------------|---------|-----------------------------------| | geoip_asn_num | scalar | IP ASN lookup using `$MAXMIND_MMDB_DIR`/GeoLite2-ASN.mmdb database | NULL | [geoip_asn_num('90.9.250.1')] | | geoip_asn_org | scalar | IP ASN org lookup using `$MAXMIND_MMDB_DIR`/GeoLite2-ASN.mmdb database | NULL | [geoip_asn_org('90.9.250.1')] | | geoip_city | scalar | Geoip city lookup using `$MAXMIND_MMDB_DIR`/GeoLite2-City.mmdb database | NULL | [geoip_city('90.9.250.1')] | | geoip_country_iso | scalar | Geoip country lookup using `$MAXMIND_MMDB_DIR`/GeoLite2-City.mmdb database | NULL | [geoip_country_iso('90.9.250.1')] | ### 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 |