{"id":23413009,"url":"https://github.com/cgivre/drill-geoip-functions","last_synced_at":"2025-04-12T04:02:31.991Z","repository":{"id":76248987,"uuid":"80320565","full_name":"cgivre/drill-geoip-functions","owner":"cgivre","description":"GeoIP Functions for Apache Drill","archived":false,"fork":false,"pushed_at":"2019-09-25T14:50:56.000Z","size":59912,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T23:34:47.466Z","etag":null,"topics":["apache-drill","city","country","data","data-analysis","data-science","drill","geoip-functions","ip-address","ipv4"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgivre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-29T00:29:53.000Z","updated_at":"2021-08-22T19:08:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5e974f9-91c7-4606-97d0-28b6a2103618","html_url":"https://github.com/cgivre/drill-geoip-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgivre%2Fdrill-geoip-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgivre%2Fdrill-geoip-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgivre%2Fdrill-geoip-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgivre%2Fdrill-geoip-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgivre","download_url":"https://codeload.github.com/cgivre/drill-geoip-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514226,"owners_count":21116902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-drill","city","country","data","data-analysis","data-science","drill","geoip-functions","ip-address","ipv4"],"created_at":"2024-12-22T18:27:23.579Z","updated_at":"2025-04-12T04:02:31.981Z","avatar_url":"https://github.com/cgivre.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoIP Functions for Apache Drill\nThis is a collection of GeoIP functions for Apache Drill. These functions are a wrapper for the MaxMind GeoIP Database.\n\nIP Geo-Location is inherently imprecise and should never be relied on to get anything more than a general sense of where the traffic is coming from. \n\n* **`getCountryName( \u003cip\u003e )`**:  This function returns the country name of the IP address, \"Unknown\" if the IP is unknown or invalid.\n* **`getCountryConfidence( \u003cip\u003e )`**:  This function returns the confidence score of the country ISO code of the IP address.\n* **`getCountryISOCode( \u003cip\u003e )`**:  This function returns the country ISO code of the IP address, \"Unknown\" if the IP is unknown or invalid.\n* **`getCityName( \u003cip\u003e )`**:  This function returns the city name of the IP address, \"Unknown\" if the IP is unknown or invalid.\n* **`getCityConfidence( \u003cip\u003e )`**:  This function returns confidence score of the city name of the IP address.\n* **`getLatitude( \u003cip\u003e )`**:  This function returns the latitude associated with the IP address.\n* **`getLongitude( \u003cip\u003e )`**:  This function returns the longitude associated with the IP address.\n* **`getTimezone( \u003cip\u003e )`**:  This function returns the timezone associated with the IP address.\n* **`getAccuracyRadius( \u003cip\u003e )`**:  This function returns the accuracy radius associated with the IP address, 0 if unknown.\n* **`getAverageIncome( \u003cip\u003e )`**:  This function returns the average income of the region associated with the IP address, 0 if unknown.\n* **`getMetroCode( \u003cip\u003e )`**:  This function returns the metro code of the region associated with the IP address, 0 if unknown.\n* **`getPopulationDensity( \u003cip\u003e )`**:  This function returns the population density associated with the IP address.\n* **`getPostalCode( \u003cip\u003e )`**:  This function returns the postal code associated with the IP address.\n* **`getCoordPoint( \u003cip\u003e )`**:  This function returns a point for use in GIS functions of the lat/long of associated with the IP address.\n* **`getASN( \u003cip\u003e )`**:  This function returns the autonomous system of the IP address, \"Unknown\" if the IP is unknown or invalid.\n* **`getASNOrganization( \u003cip\u003e )`**:  This function returns the autonomous system organization of the IP address, \"Unknown\" if the IP is unknown or invalid.\n* **`isEU( \u003cip\u003e ), isEuropeanUnion( \u003cip\u003e )`**:  This function returns `true` if the ip address is located in the European Union, `false` if not.\n* **`isAnonymous( \u003cip\u003e )`**:  This function returns `true` if the ip address is anonymous, `false` if not.\n* **`isAnonymousVPN( \u003cip\u003e )`**:  This function returns `true` if the ip address is an anonymous virtual private network (VPN), `false` if not.\n* **`isHostingProvider( \u003cip\u003e )`**:  This function returns `true` if the ip address is a hosting provider, `false` if not.\n* **`isPublciProxy( \u003cip\u003e )`**:  This function returns `true` if the ip address is a public proxy, `false` if not.\n* **`isTORExitNode( \u003cip\u003e )`**:  This function returns `true` if the ip address is a known TOR exit node, `false` if not.\n\nThis product includes GeoLite2 data created by MaxMind, available from \u003ca href=\"https://www.maxmind.com\"\u003ehttps://www.maxmind.com\u003c/a\u003e.\n\n\n## Protocol Lookup Functions\nThese functions provide a convenience lookup capability for port numbers. They will accept port numbers as either an int or string.\n\n* `get_service_name(\u003cport number\u003e, \u003cprotocol\u003e)`:  This function returns the service name for a port and protocol combination.  \n```\napache drill\u003e select get_service_name(666, 'tcp') as service from (values(1));\n+------------------+\n|     service      |\n+------------------+\n| doom Id Software |\n+------------------+\n1 row selected (0.178 seconds)\n```\n\n* `get_short_service_name(\u003cport number\u003e, \u003cprotocol\u003e)`: Same as above but returns a short protocol name. \n\n```\napache drill\u003e select get_short_service_name(21, 'tcp') as service from (values(1));\n   +---------+\n   | service |\n   +---------+\n   | ftp     |\n   +---------+\n   1 row selected (0.112 seconds)\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgivre%2Fdrill-geoip-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgivre%2Fdrill-geoip-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgivre%2Fdrill-geoip-functions/lists"}