This example uses the default Converter class that ships with the IPGeo function (geolite 1.2.8), and requires that the files GeoLiteCity.dat and GeoLiteCityv6.dat are installed on ML Engine.
Input
- Input table: ipgeo_1, as in IPGeo Example: IP Database Stored as ML Engine File
SQL Call
SELECT * FROM IPGeo( ON ipgeo_1 USING IpAddressColumn('ip') Accumulate('id', 'ip') ) AS dt ;
Output
The output is the same as in IPGeo Example: IP Database Stored as ML Engine File.
id ip country_code country_name state city postal_code latitude longitude isp organization organization_type area_code metro_code dma_code -- ------------- ------------ ------------- ---------- ------------- ----------- -------- --------- ---- ------------ ----------------- --------- ---------- -------- 4 202.106.0.20 CN China Beijing Beijing NULL 39.9289 116.3883 NULL NULL NULL 0 0 0 6 168.187.7.114 KW Kuwait Al Kuwayt Kuwait NULL 29.3697 47.9783 NULL NULL NULL 0 0 0 5 69.236.77.51 US United States California San Francisco NULL 37.7749 -122.4194 NULL NULL NULL 415 807 807 3 75.36.209.106 US United States California San Francisco NULL 37.7749 -122.4194 NULL NULL NULL 415 807 807 1 159.41.1.23 US United States Michigan Saint Joseph 49085 42.0569 -86.4563 NULL NULL NULL 269 588 588 2 153.65.16.10 US United States Ohio Miamisburg 45342 39.6182 -84.2488 NULL NULL NULL 937 542 542
Download a zip file of all examples and a SQL script file that creates their input tables.