Skip to main content

ISA-004 — Invalid Email Detection

🟢 Beginner

⏱ 15 Minutes

⭐ 10 Points

🔓 Free

💻 SQL | PySpark

🏢 Retail Analytics


Business Context

A retail company uses customer email addresses for marketing campaigns.

Recently, campaign delivery rates dropped significantly.

Investigation revealed that several customer records contain invalid email addresses.

The analytics team has been asked to identify all records that do not contain a valid email format.

For this challenge, an email is considered invalid if it does not contain:

@


Business Impact

Invalid email addresses reduce marketing campaign effectiveness, increase communication costs, and negatively impact customer engagement metrics.

The analytics team must identify invalid email records before they reach downstream systems.


Dataset

customer_contacts
customer_idcustomer_nameemail
101Johnjohn@example.com
102Alicealice.example.com
103Bobbob@example.com
104Sarahsarah.gmail.com
105Daviddavid@example.com

Task

Return only customers whose email address is invalid.

For this challenge:

Invalid Email = Missing '@'


Expected Output

expected_output
customer_idcustomer_nameemail
102Alicealice.example.com
104Sarahsarah.gmail.com

Constraints

  • Email addresses may contain invalid values.
  • An email is considered invalid if it does not contain '@'.
  • Return only invalid customer records.

Supported Languages

✅ SQL

✅ PySpark


Hint

Look for email values that do not contain '@'.


Solution

🔒 Premium Solution

Premium members receive:

  • SQL Solution
  • PySpark Solution
  • Step-by-Step Explanation
  • Optimization Discussion

Notebook Workspace

Cell 1Dataset: customer_contacts
15:00
Loading...
Run Results
✓ Workspace Ready
Rows Returned: --
Execution Time: --
Engine: Coming Soon
Execution Engine Coming Soon