Create Beast Mode Calculated Field from sub-string in Placement separated by multiple delimiters
Hi,
I need to select a substring from our Placement Names that returns the Creative Name that is nested within the Placement Name. The characters within the Placement Names and Creative Names vary, so I need MySQL code that works in BeastMode that concatenates all characters between the -3 underscore and the -2 underscore. Can someone please help with this?
example:
Placement Name
Partner_CampaignType_CreativeType_Targeting_CampaignName_OperatingSystem__CreativeSize_CreativeName_12345678_Pixel (1234567891234)
Desired Result
CreativeName
Comments
-
I really wanted to learn how to do this with the regex function in the ETL dataflow. However, I am not any good at regex so I gave up.
Here is a solution for this with a MySQL select statement:
I will paste the code here so you can copy and paste...
SELECT
`Placement Name`
,SUBSTRING_INDEX(`part1`, '_',1) as `output`
FROM
(SELECT
`Placement Name`
,SUBSTRING_INDEX(`Placement Name`,'_',-3) as `part1`
FROM
reg_exp_help) a0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 657 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 775 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 81 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive