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
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 303 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 104 SQL DataFlows
- 640 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 769 Beast Mode
- 72 App Studio
- 43 Variables
- 718 Automate
- 185 Apps
- 462 APIs & Domo Developer
- 57 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 402 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 135 Manage
- 132 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive