# Lookup IP addresses RWHOIS data from IPinfo’s WHOIS Summary database on Snowflake

**URL:** <https://community.ipinfo.io/t/lookup-ip-addresses-rwhois-data-from-ipinfo-s-whois-summary-database-on-snowflake/1119>\
**Category:** Integrations & Platforms\
**Tags:** database, snowflake, rwhois, whois\
**Created:** [June 20, 2023, 5:06am UTC](https://community.ipinfo.io/t/lookup-ip-addresses-rwhois-data-from-ipinfo-s-whois-summary-database-on-snowflake/1119 "2023-06-20T05:06:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [June 20, 2023, 5:06am UTC](https://community.ipinfo.io/t/lookup-ip-addresses-rwhois-data-from-ipinfo-s-whois-summary-database-on-snowflake/1119/1 "2023-06-20T05:06:53Z")

</div>

On Snowflake, all of our listings come with their own unique UDTF (_**[User Defined Table Functions](https://docs.snowflake.com/en/developer-guide/udf/sql/udf-sql-tabular-functions)**_) that is designed to enrich your IP database in the most efficient way possible. You should exclusively use these UDTFs if you are doing bulk IP data enrichment using our database.

The IP RWHOIS database is included in our [IPinfo WHOIS Summary dataset (RIR)](https://app.snowflake.com/marketplace/listing/GZSTZ3VDMFE) listing along with the IP RIR WHOIS database.

🔗 Please refer to our **[IPinfo’s Snowflake Integration Documentation](https://ipinfo.io/developers/snowflake_integration)** to learn more.

🔗 **[IPinfo’s Listings on Snowflake Marketplace](https://ipinfo.io/snowflake)**

🔗 **[Documentation and Database Schema: IP to WHOIS Database](https://ipinfo.io/developers/ip-whois-database)**

🔗 [**IPinfo WHOIS Summary dataset (RIR) - Snowflake Marketplace**](https://app.snowflake.com/marketplace/listing/GZSTZ3VDMFE)

## Using the `IP_RWHOIS` UDTF for our WHOIS Summary database

Let’s say your table containing the IP addresses is called `LOGS`, and the column containing the IP address is called `IP`. Based on this, use the provided **`IP_RWHOIS`** UDTF from the `public` schema of your IPinfo shared database.

```sql
SELECT *
FROM logs l
LEFT JOIN TABLE(ipinfo.public.IP_RWHOIS(l.ip))

```

> Please note that the **`ipinfo`** on the **`ipinfo.public.IP_RWHOIS`** can be different for you. It depends on the name you gave to our listing when you purchased it.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/1X/17566a17e2683aa4394806c793dcffa87793f781.jpeg)

The UDTF format is:

```auto
SELECT <column_containing_ip_addresses>
FROM <input_table> <table.alias>
JOIN TABLE(<data_share_name>.public.<UDTF_name>(<table_alias.column_name>))

```

The UDTF will return the IP RWHOIS related information for IPs which includes:

- IP address range
- WHOIS ID
- Organization name
- Description
- Hostname
- Country of the organization
- Email of the organization
- Abuse contact
- The official domain of the organization
- Street address of the organization
- Postal code
- Updated date
- Imported date

For invalid IP addresses or IP addresses that aren’t included in our database, the outputted table will not include their information

If you want to learn about the technical aspect of how we came up with these UDTFs and the process behind their efficiency, read this article: [How to get IP Data in Snowflake - IPinfo.io](https://ipinfo.io/blog/ip-address-data-in-snowflake/)
