Background
The intention of this post is to have a space where different options for deploying macros, both in Alteryx Gallery and on local machines, can be explored and compared. A lot of this documentation came from a client's request to explore how to best deploy macros to their server and Desktop users. When compiling research from a range of people and sources I decided that this could be a good reference for all Alteryx users and decided to make a quick blog post. The page will be covering a range of topics. If there is something else you would like explored or I was totally wrong on something then feel free to reach out! Any feedback is much appreciated.
Primary Considerations
How an organization deploys and maintains macros depends on a range of factors, such as who will be using the macros, the frequency that they are updated, etc… It's important to have an understanding of an organization's primary considerations before exploring different ways to deploy macros. Listed below are some basic considerations to start with before deploying macros.
Consideration 1: Macro Update Frequency
Versioning
Dynamic Access
Consideration 2: Storage Preferences
- Storing different versions
- Which preferences allow for dynamic access
- Git / repositories
Consideration 3: SDLC
- Storing macros in different repositories
- Moving macros from one repository to another as they move through SDLC
- Updates to macros that will require them to move through the cycle again
- Ensuring that users are able to only deploy production stage macros
Consideration 4: Deploying Macros
- Static, packaged macros versus dynamic macros (or both)
- Deploying macros to Gallery, especially when they exist within workflows
- Deploying macros to local machines
- Creating a macros section in the tool palette by creating a macro repository
- Relative paths vs shared drives
Consideration 5: Future Plans
- Using XML of macros to update versioning / track changes
- Push macros automatically from one repository to another when ready
Industry Best Practices
I have been talking to multiple Alteryx experts within my organization and doing some research online to get a better understanding of how different businesses handle macro deployment. As a result of this research, I have gained a high-level understanding of best practices that I would like to share here before specific approaches / different options are explored in detail. Please note:
- How many people use Alteryx within the business
- How the business commonly stores files
- Whether macros need to be updated frequently after being deployed
- SDLC practices
A quick synopsis of best practices:
Possible Approaches to Macro Deployment
This section will cover different potential approaches to deploying macros. Each approach will include a high-level summary and a section that details whether the approach is conducive to the primary considerations previously outlined.
Approach One: Deploying Macros Using Just Gallery
This approach would entail creating collections to store macros in the gallery. Users would be able to access the production macro collection and download the macros to their local machines. Since workflows in Gallery with macros in them cannot reference macros that exist within the Gallery, the macros would have to be packaged with the workflow when deployed to the Gallery. Once macros were downloaded to the local machine, they could be placed in a specific folder that could be referenced within Alteryx to create a tool palette of macros. Let us review how this approach aligns with our primary considerations:
Macro Update Frequency
Storage Preferences
SDLC Practices
Deploying Macros
Future Plans
Approach Two: Deploying Macros Using Gallery and a Shared Drive
Approach two would deploy macros to the various SDLC collections in the Gallery but instead of packaging the macro within the workflow, the macros would exist within a shared folder that the workflows in the Gallery could reference. The shared drive wouldn't have to have a folder for each cycle (unless we wanted a folder setup that matched the collections we have in Gallery). That said, it would be necessary that within the shared drive there exists a production folder for the macros (that the workflows can reference) and preferably a folder for storing different versions of the macros (unless the organization wanted to do versioning within Gallery itself). The main benefits of this are that any Alteryx user could access the production macros from the shared drive and the Gallery itself could reference the newest versions of the macro. Users would not have to open workflows and switch out the macros when they're updated. Users could reference the production macros folder in their Designer to get a tool palette of all the updated macros.
Macro Update Frequency
Storage Preferences
SDLC Practices
Deploying Macros
Future Plans
Please note it has been difficult for me to get information on (or test) approaches three and four. If you are interested in the next two approaches please take some time to test around in a sandbox environment.
Approach Three: Deploying Macros Using Gallery and SharePoint
There are a few things to note about SharePoint before we explore using it to deploy macros. One is that there are two types of SharePoint: SharePoint Online and SharePoint On-Premises. SharePoint Online has file paths represented by URLS, and everything exists within the cloud. SharePoint On-Premises or SharePoint Server has the organization install and manage the infrastructure themselves. With On-Premises users "access files and resources by connecting to the local SharePoint server or network location using file paths specific to that environment." I am going to operate under the assumption that most organizations are using SharePoint Online. The second thing to note is that Alteryx has tools that can connect to and output to SharePoint. That said, it seems to be limited to common files for storing data/tables and is probably not relevant to deploying macros.
From what I have researched, it doesn't seem possible that macros can be stored in SharePoint and reference said macros to be used within workflows that are deployed in Gallery. The reason for this is that on the machine hosting Alteryx Server there needs to be a file path to macros that are being used in Gallery. If there is no file path, and SharePoint doesn't have file paths just URLS, then the macros need to be packaged within the workflows. SharePoint could still be used to store production macros that users could pull down to their local machines, but it does not seem like it would be an effective way to dynamically deploy macros to Gallery.
Macro Update Frequency
Storage Preferences
SDLC Practices
Deploying Macros
Future Plans
Approach Four: Deploying Macros Using Gallery and OneDrive
OneDrive differs from Sharepoint in a few ways. One is that it is primarily designed for personal storage for individual users. Two is that although it stores files in the cloud, users can create files on their local machines that can be synced to the cloud and shared with others.
Since OneDrive has actual file paths, it seems as if it is actually possible to store macros in OneDrive and dynamically deploy them to workflows in Gallery. The process would be very similar to the approach outlined in the shared drive section. There are some caveats to this approach. One is that OneDrive folders would still have to exist on the machine hosting the server and on the local machines. This is because we still need a file path for the Gallery to reference. Two is that any folder that stores production macros for deployment would have to be shared with all the users who may need to use the macros (as well as the machine hosting the server).
Macro Update Frequency
Storage Preferences
SDLC Practices
Deploying Macros
Future Plans
Conclusion
How an organization deploys and stores macros is dependent on a range of factors. As an Alteryx Developer, it is important that you understand these factors before developing a strategy for deployment. In this post, we have explored a few ways that macros can be deployed in an organization, but it is important to note that these are not the only ways to approach this problem. Consult with members of your organization and the Alteryx community itself before executing your plan.
Extra Notes
Version Control / Git:
Version control of workflows or macros can be approached in a variety of ways. Here are some good resources to reference to gain an initial understanding of how you should be versioning:
Workflow Versioning in Gallery
Choosing Which Workflow to Publish
Alteryx vs Version Control, Code Repo/Git, R and Python code, Best Practices, Promote Code
Alteryx Workflow Version Control
Another Alteryx Workflow Version Control Post
Resources for Macro Deployment:
Creating Your Own Tool Category in the Tool Palette
Sharing Macros in Alteryx Designer and Server