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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive