Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.8 KB

is_email_valid.md

File metadata and controls

30 lines (18 loc) · 1.8 KB

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.