Using IPinfo’s IP to Country + ASN database on Snowflake

IPinfo’s open access IP to Country + ASN database offers IP geolocation insights within Snowflake. Whether you’re developing a data pipeline or running cybersecurity analytics, IPinfo’s IP to Country + ASN database makes data exploration easy.

:link: Get your IPinfo IP to Country + ASN database directly from here

:link: Documentation and Database Schema: IP to Country + ASN Database

IIPinfo_Snowflake_free_IP_DB.gif

Once you have brought your IP database to your worksheet, you should use our UDTFs. We provide three UDTFs.

  1. IP_DETAILS ⇒ Provides all the country and ASN information available for IP addresses
  2. IP_COUNTRY_DETAILS ⇒ Provides country-level information for IP addresses
  3. IP_ASN_DETAILS ⇒ Provides ASN-related information for IP addresses

IP_DETAILS UDTF

Get both country and ASN information from IP Addresses.

SELECT *
FROM log l
JOIN TABLE(IPINFO_COUNTRY_ASN_IP_ADDRESS_DATA.PUBLIC.IP_DETAILS(l.ip))

IP_COUNTRY_DETAILS UDTF

Get only country-level geolocation information

SELECT *
FROM log l
JOIN TABLE(IPINFO_COUNTRY_ASN_IP_ADDRESS_DATA.PUBLIC.IP_COUNTRY_DETAILS(l.ip))

IP_ASN_DETAILS UDTF

Get IP to ASN level enrichment.

SELECT *
FROM log l
JOIN TABLE(IPINFO_COUNTRY_ASN_IP_ADDRESS_DATA.PUBLIC.IP_ASN_DETAILS(l.ip))