Links

GEO_IP

Use an IP Address to lookup geo information

Syntax

GEO_IP(attributes1[, attributes2, ..., attributesN], IP Address)

Arguments

Name
Type
Description
Default Value
attributes#
geoipattribute
The attribute to extract for the given IP address
IP Address
string
The IP address to use for geo ip information lookup

Examples

attributes
IP Address
Output
'Locale Code'
'2.87.124.4'
en
'Continent Code'
'2.87.124.4'
EU
'Continent Name'
'2.87.124.4'
Europe
'Country Iso Code'
'2.87.124.4'
GR
'Country Name'
'2.87.124.4'
Greece
'Subdivision 1 Iso Code'
'2.87.124.4'
L
'Subdivision 1 Name'
'2.87.124.4'
South Aegean
'City Name'
'2.87.124.4'
Rhodes
'Metro Code'
'2.87.124.4'
``
'Time Zone'
'2.87.124.4'
Europe/Athens

Transformation job example

SQL

CREATE JOB function_operator_example
ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
SELECT attributes, IP Address,
GEO_IP('Locale Code', IP Address) AS Output
FROM default_glue_catalog.upsolver_samples.orders_raw_data
LET attributes = 'Locale Code',
IP Address = '2.87.124.4'
WHERE time_filter()
LIMIT 1;

Query result

attributes
IP Address
Output
'Locale Code'
'2.87.124.4'
en