Alteryx Designer Desktop Discussions

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

Parsing the data

sagarghimire
7 - Meteor

How can I parse dataset like this? Any insights is appreciated. Space would not work as a delimiter as Column names itself have spaces one or more in it. TIA

 

Output desired:

ID NameDescriptionPart Number
123 CERAMIC CAPACITOR FIXED 223-405
456LABEL, MICROWAVE  HIGH VOLTAGE3100-123

 

Input:

ID Name          Description          Part Number
123  CERAMIC CAPACITOR FIXED   223-405
456  LABEL, MICROWAVE  HIGH VOLTAGE   3100-123
3 REPLIES 3
binuacs
20 - Arcturus
OllieClarke
15 - Aurora
15 - Aurora

Hey @sagarghimire 

Here's how I'd parse this data:
image.png

We can use RegEx to parse out the data based on the character types used. 

(\d+)\s+(\D+?)\s+([\d-]+)

In case you've not used RegEx before, the brackets "()" let use capture bits of text to output in new columns.

\d+ is "one or more digits"
\s+ is "one of more white space characters"
\D+? is "one or more non-digits as few as possible"
[\d-]+ is "one or more of either digits or hyphens.

There's more info on RegEx all over the community, but I'd suggest starting with the example workflow in designer itself.

Hope that helps,

 

Ollie

DataNath
17 - Castor

Hey @sagarghimire, there's a good few ways to do this but assuming the pattern is always <ID Name><Space><Description (with/without spaces><Space><Part Number> then here's a method using standard string functions:

 

Product info parse.png

Labels