iplocation
Table of Contents
Examples
By default, iplocation
shows the following columns:
-
country
-
lat (shortened from latitude)
-
lon (shortened from longitude)
-
region
-
city
The data shown in columns generated by iplocation
is based on the given ip address.
%dpl
| makeresults count=1
| eval ip="91.158.24.3"
| iplocation ip
Configuring the Geolocation Database
To configure which geolocation database is used in iplocation
, use spark.conf
interpreter.
%spark.conf
dpl.pth_10.transform.iplocation.db.path=/tmp/GeoLite2-City.mmdb
allfields
Use allfields
argument to show more columns provided by the geolocation database. By default, allfields
is set to false.
%dpl
| makeresults count=1
| eval ip="91.158.24.3"
| iplocation allfields=true ip