Monitoring ‘Publicly’ shared content on your Alteryx Server
One aspect of the Alteryx Server product that customers can find extremely useful is the public gallery; at The Information Lab we use this area to host Alteryx Applications which allow any non-technical business users (i.e. our sales team ;)) leverage the power of Alteryx, without necessarily having to understand whats going on ‘under the hood’.
The image below shows examples of these applications that we host on our internal public gallery.
We also use the public gallery to share use-case examples, to everyone in our business, to allow them to understand what is possible with the Alteryx Designer product. These samples can then be downloaded and opened in Designer so they can understand exactly how to perform said action.
BUT, this public gallery area may not necessarily be useful to everyone, and in fact, some companies may wish no content be shared to this public area (for example, an individual could relatively easily, share something sensitive to this public area).
I will use this blog to highlight how we can monitor if content has been posted to this area, and therefor prompt the owner to remove it from the public area.
To my knowledge, there is no way to disable the feature of publishing to the public gallery, but if there is, please let me know and I will edit this post accordingly!
So, how can we monitor this public gallery area of our Alteryx Server? Why, via the MongoDB of course. As a quick intro as to what the MongoDB is, it contains a catalogue of every action and every asset that exists in our Alteryx Server environment; so it’s a bloody useful monitoring tool!
This blog is a good resource for understanding how to connect to the Alteryx Server MongoDB, if you already know how, then please proceed with the rest of the post, if not, then please read the post linked before moving onto the next section!
Note, the workflow displayed in this example can be found here, so please don’t feel like you have to recreate all the steps, the below is just for your information!
So, let’s start with bringing a MongoDB tool onto our Alteryx canvas and connecting to the ‘Alteryx Gallery’ database, and then the ‘appInfos’ collection that sits within that.
This table contains a whole host of fields, but only a few are relevant to this business question we are trying to answer; those fields are listed below, and we can use a select tool to keep and rename these fields…
I’m sure it’s relatively obvious why we are keeping most of these fields; the author details will allow us to get the email addresses of those authors who have pushed the workflow into a public area, and whilst the date fields aren’t necessary, they could be seen as useful.
The ‘IsDeleted’ and ‘IsPublic’ fields will allow us to identify those applications that still exist at all, and then from those, identify those which are in the public gallery, this process can be done with a simple filter tool.
You can see the result produced by our MongoDB analysis, where we have 8 items in the public gallery (those that are all shown in the first image of the blog!).
So, we have our list of applications/workflows/macros which are in the public gallery but shouldn’t be, so now it’s time to get our user details (like their email addresses), so we can prompt them to take action, this process can be done by joining our current datastream with the MongoDB ‘Users’ collection that exists in the ‘AlteryxGallery’ table.
But before I take this step, I have added a quick ‘transpose, so that each of our two authors has an individual row, this may seem unnecessary but it will help us build our email later in the process, and also mean we only have to perform one join step against our user table.
Once we have done this, and then connected to our ‘users’ collection, we are only going to select a certain few fields, again not a mandatory step but it helps reduce the number of fields to something more manageable.
Then we can merge our datasource together on our ‘UserID’ fields, before performing a unique step to ensure that we only have one application per user (to having one row, rather than two, when the latest author and original author are the same individual).
At this point, this is where you need to get creative on how you want to report off of this data table you have created. For instance, you may want to, within the same workflow, use the email capabilities built into the Alteryx product to send automated emails to these users when this content is identified.
The above is the example included in the sample workflow!
Perhaps you feel this isn’t entirely neccessary and instead you just want to build add a report to your admin collection via either the charting and insights tool in Alteryx, or by another tool such as Tableau; the world is your oyster.
Hey, even if we are happy with users publishing content, we may want to send an initial email just to check they have intentionally published into said area.