Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Read data from CSV file and split it into columns

poojamate92
8 - Asteroid

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:

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

Here's a quick take:

 

I used some regex formulas and parsed the data.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
SeanAdams
17 - Castor
17 - Castor

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

 

Labels