Parse out the domain of an email address
MarkFlachs
Member
in Archive
Hi Everyone,
In a data flow, how do you parse out the domain portion of an email address so it can be put it in a separate field? Please let me know if you have had any experience with this.
Thanks,
Mark
0
Comments
-
In your SELECT statement, could you embed a LOCATE() function within SUBSTR() function?
SUBSTR(`email`, (LOCATE('@', `email`) + 1))
If that works correctly, I would expect it to pull from a value of 'john.smith@generic.com' and return a value of 'generic.com'.
**Say thank you by clicking the 'thumbs up'
**Be sure to select the answer that represents the best solution and mark as "Accept as Solution"0 -
@MarkFlachs, did ckatzman's reply help you out?
0 -
ETL:
Long story short, you will create a new column, copy email to that new column and then strip out the data pre '@'. Here are the steps:
- Pull in your Input DataSet
- Add a Constants (new column) set Type = text and Constant = empty string
- Set a Column Value to copy data from, ie copy the Email field
- Replace Text of the new column (2 parts in this step):
- Select your new column and under 'Enter a term' = ^[^@]* Be sure to set to 'Use RegEx' and Replace found term = Empty string
- Select your new column and under 'Enter a term' = No other setting needed and Replace found term = Empty string
Hope that helps!
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 693 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive