Skip to content

bigfunctions > is_email_valid

is_email_valid

Call or Deploy is_email_valid ?

✅ You can call this is_email_valid bigfunction directly from your Google Cloud Project (no install required).

  • This is_email_valid function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

is_email_valid(email)

Description

Return true if email is valid (inspired from this reddit answer)

Examples

1. with a valid email

select bigfunctions.eu.is_email_valid('paul.marcombes@unytics.io')
select bigfunctions.us.is_email_valid('paul.marcombes@unytics.io')
select bigfunctions.europe_west1.is_email_valid('paul.marcombes@unytics.io')
+----------------+
| is_email_valid |
+----------------+
| true           |
+----------------+

2. with incorrect format

select bigfunctions.eu.is_email_valid('paul/marcombes@example.com')
select bigfunctions.us.is_email_valid('paul/marcombes@example.com')
select bigfunctions.europe_west1.is_email_valid('paul/marcombes@example.com')
+----------------+
| is_email_valid |
+----------------+
| false          |
+----------------+

3. with a domain not registrable

select bigfunctions.eu.is_email_valid('paul.marcombes@example.con')
select bigfunctions.us.is_email_valid('paul.marcombes@example.con')
select bigfunctions.europe_west1.is_email_valid('paul.marcombes@example.con')
+----------------+
| is_email_valid |
+----------------+
| false          |
+----------------+

Need help using is_email_valid?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using is_email_valid?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

A common use case for the is_email_valid function would be cleaning or validating customer data in a BigQuery table.

Imagine you have a table of user information, including an email address column. You want to identify and potentially correct or remove invalid email addresses.

Scenario:

You have a table named users with columns like user_id, name, and email. You want to create a new table containing only users with valid email addresses.

Query:

SELECT *
FROM `your_project.your_dataset.users`
WHERE bigfunctions.your_region.is_email_valid(email);

Replace your_project, your_dataset, and your_region with your actual project ID, dataset ID and BigQuery region respectively (like bigfunctions.eu if your dataset is in EU multi-region).

This query uses the is_email_valid function to filter the users table, keeping only rows where the email column contains a valid email address according to the function's validation criteria.

Other Use Cases:

  • Data Quality Reporting: Generate reports on the percentage of valid email addresses in your data. This helps track data quality and identify potential issues.
  • Pre-processing for Marketing Campaigns: Ensure that your marketing emails are sent only to valid email addresses, reducing bounce rates and improving campaign effectiveness.
  • Form Validation: Use the function as part of a data pipeline to validate email addresses submitted through online forms before storing them in your database.
  • Lead Scoring: Assign higher scores to leads with valid email addresses, prioritizing them for sales outreach.

By incorporating the is_email_valid function into your BigQuery workflows, you can improve the accuracy and reliability of your data, leading to better decision-making and more effective business processes.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on