We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
TheOC
16 - Nebula
16 - Nebula

This article is part of the Alteryx Obscura Blog series. Alteryx Obscura is the Inspire session dedicated to all things non-analytics, highlighting what the software “can” do rather than what it’s “supposed” to do. 

 

Hi all – It’s me again, this time back with something terrible that I’m sure will cause distress.

 

Let me take you back, not quite back to when @mceleavey was young and the world was in black and white, but back to the 90s-00s. Life was good, what could possibly be introduced to change that?...

 

image001.jpg

 Source: artsy.net

 

Everyone who remembers this little guy knows exactly the pain I’m about to cause. Look at his smug little face.

Yes - I’m bringing the best parts of the internet to Alteryx Designer: Clippy, Pop-up ads, Captchas. Nobody asked for this – I did it anyway: Obscura!


“OC, you monster, you must be stopped. You can’t just release a virus in Alteryx Designer and not do anything to stop it.”

 

Anyway, here’s what it looks like from a user perspective:

 

1. Captcha: “Yes, I’m not a robot, just let me in.

 

image002.gif

 

2. Pop-up Ads: “Oooo, a free iPod Shuffle!”

 

image003.gif

 

3. Clippy: “I hate him.

 image004.gif

 

How it works

 

The logic is quite simple: in essence, this leverages a Python library called Flask, which allows you to quickly host web servers and simple pages. I’ve just whipped up some HTML (with no help from ChatGPT) to display these messages.

 

The part I find really cool about this is that the tool is blocking, meaning the workflow is effectively ‘paused’ while you interact with the webpage – and it won’t run the next tool until the macro has finished running. Before you ask: Yes, it can be used for useful things like:

  • Ask a user to confirm sensitive operations (and display data).
  • Prompt for input mid-workflow (expansion on Analytic Apps).
  • Build approval steps or sign-offs before continuing.
  • Conditionally run the next part of the workflow.

 

Instead, I used it for this.

 

Source: GIPHY

 

Try it yourself!


I’ve attached the workflow so you can torment yourself with Clippy, ads, and pop-ups inside Alteryx Designer. Don’t blame me for any uncovered trauma from seeing Clippy’s face again. I’ve stuck them all over Steve from Finance’s workflows – he’s going to pull his hair out in the morning.

Comments
mceleavey
17 - Castor
17 - Castor

"Let me take you back, not quite back to when @mceleavey was young and the world was in black and white..."

 

Timberlake.gif

BS_THE_ANALYST
15 - Aurora
15 - Aurora

"OC, you monster, you must be stopped" 

TrueItsTrueGIF.gif



Pilsner
13 - Pulsar

Another blog, absolutely smashing the posts @TheOC! Been waiting for this one to drop, being able to pause the workflow whilst waiting for a user input is pretty powerful, I'm curious if it works inside an iterative macro - there could be even more possibilities if it does

Erin
11 - Bolide

 @TheOC - Somehow I want to say "thank you" and also "no thank you" at the same time 

but-thank-you-dan-levy

 

In all seriousness, this is really awesome! The Obscura projects have inspired me to start learning Python. I know it's incredibly powerful. Mind sharing any examples of what you utilize Python to do within Alteryx? Like everyday things, not genius-level Obscura examples, because baby steps

TheOC
16 - Nebula
16 - Nebula

hey @Erin ,
Absolutely!

There are some fantastic Python libraries out there that tackle very niche things.
A few projects I've done in Alteryx that utilise Python are:

  • Text Translation (via API or specific package for translation)
  • Web scraping! Sometimes sites are a little too crafty and can stop you with a simple download tool. Python has ways around that. 
  • Machine Learning (bit of a beefy one, but Python/R are king on this one)
  • Reporting: I do like the reporting tools in Alteryx but if you need to break the mould, there are a few really great tools in Python for this.
  • Data Profiling: This isn't really an area that Alteryx needs help, but I'm a big fan of the ydata profiling package (https://docs.profiling.ydata.ai/latest/)

To be honest its a tad tricky because Alteryx is so great at doing the 99.9% of tasks, very simply. It's generally only the 0.1%'s where I have to utilise Python, and as a result they can end up being quite complex in code. However, part of the beauty of Python is almost everything has already been done and wrapped into a nice package already. Pypi can be a cool place to search for these - for instance here's the search for any package that is under the topic 'Games/Entertainment':
https://pypi.org/search/?q=&o=&c=Topic+%3A%3A+Games%2FEntertainment 

 

 

Erin
11 - Bolide

Oh this is awesome! Thanks! So far I've just made pretty Excel files. I originally did it without Python, but it required a template file and roughly 20+ extra tools whereas I found it can be accomplished with a single Python tool instead (and usually more secure when writing to multiple tabs of the same Excel file). Web scraping....hmmm....**giggles maniacally**  watch out world!