Read data from CSV file and split it into columns
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have to solve murder mystery. Input is in CSV file. So how can read data from CSV file and split it into different fields. I have attached file below:
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's a quick take:
I used some regex formulas and parsed the data.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Agree with @MarqueeCrew - this is definately one for Regex.
Now - regex tool was very confusing to me - I could never figure out the right way to configure them, or how to get what I wanted - and Mark was SUPER helpful. Here's my top tips for this kind of situation you're trying to solve:
- Regex in alteryx has 4 modes in Alteryx. If you want a specific piece of text out of a long string, use "Parse" mode.
- In parse mode - the piece you want is in round brackets.
- So if you have text aaaa123aaaa and you use a regex that looks like this a{1,}(\d*)a* it will put "123" into your column in the outbound string.
- If instead you want the first string of "a" characters then use the same regex but with a different piece in brackets: (a{1,})\d*a*
- Use http://regex101.com. Incredible way to play with Regex strings and get to the string you want. Simply superb
Good luck with your challenge - let us know if more help is needed.
Sean
![](/skins/images/33644471E927638F516C93A75ADDEE18/responsive_peak/images/icon_anonymous_message.png)