CSV separator but not
Ok so I have a string of data that has approximately 60 digits in it.
There is no obvious delimiter - we just have to know the spot where to seperate.
I am working in ETL and am essentially trying to do the SQL function where I start at a certain digit and end at another. I need to do this 7 times over so just using the string operations that doesn't splice the data wont help.
I could splice and resplice based off the created column but I am hoping for a more efficient solution.
Any suggestions?
Here is the string for reference
If this helps, feel free to agree, accept or awesome it!
Best Answer
-
I think if I'm understanding your problem, I would use SUBSTRING to split your string based on position and characters.
Based on your example:
If the columns are variable in length, and there is no pattern or delimiter, I'm not sure there's a great solution even using regex as you need a pattern to be able to match with regex.1
Answers
-
@damen If you're wanting to do this as efficiently as possible, your best bet is probably using regex to input commas at your defined intervals, and then use the split string tile.
This approach assumes that your desired split locations are consistent, and that you will always have the same number of splits.
Alternatively, this could be a good use for the Python or R tiles, and you could do it all in one go. If I was going to do it, I would probably use the Python tile.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**0 -
I think if I'm understanding your problem, I would use SUBSTRING to split your string based on position and characters.
Based on your example:
If the columns are variable in length, and there is no pattern or delimiter, I'm not sure there's a great solution even using regex as you need a pattern to be able to match with regex.1 -
@damen I like the answer provided by @JasonAltenburg better than my own. When you get ready to select an answer, please choose his instead of mine. I was unintentionally over-complicating things by suggesting python or r.
Agree with what Jason said as well about a variable length or inconsistent pattern, for either of our suggested approaches, those will be necessary.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**0
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
- 754 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