IP lookup
IP lookup returns location information and point geometries for IP addresses in a table.
IP lookup is useful when you are analyzing access data to web services. The returned table contains the following fields:
-
<key field>: The same as the key field for the name table.
-
<address table IP field>: The same as the IP field that was looked up. Only available if it is not the same as the key field.
-
IpPoint: The point for the found item.
-
CountryIso2: The country code for the found item.
-
Adm1Code: The code for the first order administrative area for the found item. Note that this code is not always compatible with the code returned by the location service.
-
City: The city for the found item.
-
All fields except the key field from the input dataset, prefixed with the dataset name.
IP geolocation is inherently imprecise. For many IP-addresses it is possible to pinpoint a city, but for others only country can be resolved.
It is common that the same IP is repeated in many rows in a table. As a best practice, performance is improved if you filter out only the unique IP addresses. For example:
In this example, the table MyDistinctIpData is used to filter distinct IP data from MyIpData. IplookupResultTable is added by Qlik GeoOperations IP lookup. Then MyDistinctIpData is dropped from the load script.
Qlik GeoOperations includes GeoLite2 data created by MaxMind, available from MaxMind.
Do the following:
-
Under Data connections, click on your Qlik GeoOperations connection.
-
Under Operation, select IP lookup.
-
Under IP address field, enter the field containing IP addresses.
-
Under Dataset 1, select the type of data source to use in the operation and its parameters.
The data types and parameters are the same as those in the Load operation. For information on each of the dataset parameters, see:
-
Under Tables, select the table to load.
-
Under Fields, select the fields to load.
-
Click Insert script.