Overview
Use Case (Alteryx on Alteryx)
So working across borders and getting myself in deep community data, I was asked by my fellow colleagues Nicole Johnson (@NicoleJ) and Will Machin (@WillM) to look at the community data and report back on a few items. However, it was clear that reporting community data was not going to be just grabbing the fields from the database.
This use case was about taking data that looks like this:
<P><U><STRONG>WHAT?</STRONG></U></P><P>We’d like to run a challenge for Inspire attendees to submit workflows and use cases that can fuel our starter kits with real world solutions. This is an attendee challenge for every Alteryx skill level!</P><P></P><UL><LI><U>Are you a prospect</U> "kicking the tires" to see if Designer can solve your problems?</LI><LI>Attend a session or visit the Solution Center and submit that solution you built during training!</LI></UL><P></P>
And changing it to this:
WHAT? We’d like to run a challenge for Inspire attendees to submit workflows and use cases that can fuel our starter kits with real world solutions. This is an attendee challenge for every Alteryx skill level! Are you a prospect "kicking the tires" to see if Designer can solve your problems? Attend a session or visit the Solution Center and submit that solution you built during training!
Now I know RegEx is not everyone’s favourite tool to use, as it does require some syntax knowledge or a play on regex101 (there is no shame in this!). However, I wanted to show you all how easy it is to remember a simple syntax that can really help you clean up your data.
Using the Replace Method within the RegEx tool, with the following expression: <.*?> and replace with nothing, i.e., don’t put anything in the box, like so…
…will provide you with the following output:
WHAT?We’d like to run a challenge for Inspire attendees to submit workflows and use cases that can fuel our starter kits with real world solutions. This is an attendee challenge for every Alteryx skill level!Are you a prospect "kicking the tires" to see if Designer can solve your problems?Attend a session or visit the Solution Center and submit that solution you built during training!
This is fantastic; using one tool, we can make this a lot more readable. However, it is obvious to see that we need to work a little more to make this grammatically ok to read. If you are anything like me, spaces are needed after that punctuation.
So back to the RegEx tool, now instead of Replacement text being nothing, just pop your cursor in there and add a space. The config won't really look different from above except that you know you have added a space 😉
Now add a data cleansing tool and for the column of body, select remove duplicate whitespace.
TADA:
WHAT? We’d like to run a challenge for Inspire attendees to submit workflows and use cases that can fuel our starter kits with real world solutions. This is an attendee challenge for every Alteryx skill level! Are you a prospect "kicking the tires" to see if Designer can solve your problems? Attend a session or visit the Solution Center and submit that solution you built during training!
This is fantastic and ready to use within reporting after just two tools. Never shy away from using data from the internet again!
Need to see it in action? Download the attached example workflow and have a go.
RegEx for the WIN - XML Tag Clean Up.yxmd