Data and spreadsheets

Snowflake integration

Two SQL functions return the status of an address, or the reason, action and error in full, straight from a Snowflake query. They run inside Snowflake as Python functions with external network access, or as an external function on AWS.

Read the full setup guideGet an API key

  • Setup guide
  • One zip: the SQL, the Python handler and the Lambda handler

SQLafter either setup

Snowflake worksheet
SELECT email, validate_email(email) AS status FROM customers;
SELECT email, validate_email_details(email):reason::VARCHAR AS reason FROM customers;

At a glance.

Status
Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
For
Data teams who keep customer or lead addresses in Snowflake and want each one’s status as a column they can join, filter and send on, without moving the data elsewhere first.
You need
A Snowflake account where you can create a network rule, a secret, an integration and functions (or an AWS account for the external function path), and an API key made for it, with a daily credit cap.
Costs
1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
Full guide
Read the full setup guide

Typical uses.

  • Clean a customer table

    Check each distinct address usually once (Snowflake may resend a batch) into a results table, then join to it in every query, model or export that needs the status.

  • Check new sign-ups each day

    Run the check-once script on a schedule: it checks only addresses that have no status yet, so each run spends credits on new rows only (usually once each).

  • Keep bad addresses out of sends

    Filter the audiences you send to other tools on the status, so addresses that cannot receive mail and throwaway inboxes never leave the warehouse.

Set it up. 4 steps.

The short version of the full setup guide, which stays the reference when a step does not match what you see.

Read the full setup guide

  1. Download the zip and make a key

    Download the zip from the guide and create an API key with Validate addresses and a daily credit cap.

  2. Create the functions inside Snowflake

    Run sql/external-access.sql statement by statement: a network rule for our API host, a secret holding the key, an external access integration and the two Python functions.

  3. Or use an external function on AWS

    Deploy the Lambda handler behind Amazon API Gateway with the key in Secrets Manager, then run the two external function scripts.

  4. Check each address once

    Run sql/3-check-once.sql to fill ev_email_results, then try validate_email('no_mailbox@sandbox.email-validation.org'): test addresses cost nothing.

Good to know.

  • It has not run in a real Snowflake account yet: it was built from Snowflake’s documentation and tested against stand-ins.

  • Every non-NULL row a query passes to the functions is checked each time the query runs; the same address twice in one batch is checked once. A query over a large table spends credits again on every run: the check-once script and a join avoid that.

  • A row that could not be checked gets a NULL status and an error code that says why, never an invented status. A wrong key fails the whole query with a message that never contains the key.

  • The functions never log an address or the key. Snowflake’s query history, its cached results and the tables you write keep what you put in them.

  • For EU data residency, point the network rule, or the Lambda, at our EU host: the same key works on both.

Connect Snowflake.

Test it on our sandbox addresses for free, then on your own contacts.

Create your accountRead the full setup guide

Updated · Maintained by: Email Validation LLC