This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Introduction Does your organization have macros that users have developed to perform common and/or repeatable tasks within Alteryx? Does your organization struggle with how best to share those macros with the Alteryx Designer users and Alteryx Workflows/Apps which have been published to the Alteryx Server? Would you like to streamline the process of updating macros and utilize them through your Alteryx Workflows? Great, now let’s take a look at how we can easily achieve this within your Alteryx environment(s). As is common with many organizations, users within the organization have likely developed macros which perform various processes in Alteryx. These macros contain everything from simple to advanced data cleansing operations, core business logic, data manipulation tasks and much more. Once a user has developed a macro, we want to make it easy for them to share that with the rest of their Alteryx community. When it comes to using macros in Alteryx Workflows and Analytic Applications published to Alteryx Server, many organizations have questions about how to deploy those Workflows that utilize these macros. More importantly, when a change is made, how do they propagate the latest version of the macro to all of the published workflows? In this article, we will discuss the best practices around sharing macros. Using the methods outlined here, users will be able to make changes to Alteryx macros that are seamlessly propagated to other Alteryx Designer users, as well as Alteryx Workflows and Analytic Applications that have been published to the Alteryx Server. What are macros? Before we dive in to sharing macros, let’s define exactly what a macro is. Macros are a series of Alteryx tools built into a single workflow, that are bundled into a single tool that can be easily inserted into another workflow to perform common, repeatable tasks. Think about it as if you were taking an entire workflow and zipping it up into one Alteryx Designer icon, which you can then put into any other workflow. A perfect example of this would be to create a standard macro out of an analytic process you have to repeatedly create on a regular basis. Having this process in a macro form, allows you to then re-use that entire process in any number of other workflows without having to recreate the analytic process (or workflow) each time. This not only helps save time, but it also makes the entire process easily repeatable and protects you from forgetting any steps in that process. One key benefit to macros is, down the road, if there is a change to be made to that whole process, you only need to make that change in one workflow (macro), rather than chase down every instance that process was replicated. Macros are identified by a .yxmc file extension. There are four main types of macros with Alteryx: Standard Macros, Batch Macros, Iterative Macros, and Location Optimizer Macros. Standard Macros These macros, as mentioned above, are designed to package a process in a workflow as a tool that can be inserted into a workflow. Batch Macros These macros run multiple times in a single workflow, creating an output after each run. The macro runs once for each record, or selected group of records, in the data. This type of macro requires a Control Parameter tool to be used as an input. For additional information, see Batch Macros. Iterative Macros These macros run in the workflow the number of times set in the configuration, or run continuously until a specified condition is met. For additional information, see Iterative Macros. Location Optimizer Macros These macros are an iterative macro that can be used in network analysis to identify an optimal location or locations. For additional information, see Location Optimizer Macros. Sharing Macros Macros can be shared with users of the Alteryx Designer and Alteryx Server using a network file share. Permissions on who has access to the macros are controlled by permissions you define on the share. You can assign share permissions to users, groups of users, and computers to expose macros to Alteryx Workflows which have been published to the Alteryx Server. Once you have placed the macro in a network share, you can add a macro repository in Alteryx Designer. After adding a macro repository in Alteryx Designer, the macros will appear in the tool palette, and can be searched by using the search toolbar in Alteryx Designer. Creating a Network Share NOTE: The following is an example of how to create a network file share. It is not intended to be used in production environments. Depending upon the permissions defined on your network, it may be necessary to work with your IT department to have a network share created or permissions granted. Assuming you have the correct permissions to create a network share, proceed as follows to create a network share for macros: Open the Computer Management console on the file server Expand the Shared Folders section Right-click on Shares and select “New Share…” Follow the prompts in the “Create a Shared Folder Wizard” to create a network share NOTE: When creating the network share, you will be prompted to set shared folder permissions. Permissions allow you to control the level of access users, groups of users, and computers have on the network share. Permission Considerations Within an Alteryx Server environment, there are various ways workflows can be run. By default, all workflows will be run by a Local System account. However, you can configure Alteryx Server to run all workflows as a specific user in the Alteryx System Settings -> Worker -> Run As settings or you can require users to enter their domain credentials to run workflows. Depending upon the configuration of your Alteryx Server environment, this can dictate how permissions need to be assigned to the network share. Example 1: If workflows are running under the default system account, in addition to assigning permissions to the share for users of the Alteryx Designer, you will need to assign computer permissions to the share for each server in your Alteryx Server environment. Example 2: If workflows are running under a service account using the Alteryx System Settings -> Worker -> Run As settings, in addition to assigning permissions to the share for users of the Alteryx Designer, you will need to grant the service account access to the network share. Example 3: If you require users to enter their credentials to run a workflow in your Alteryx Server environment, in addition to assigning permissions to the share for users of the Alteryx Designer, each user with permission to execute the workflow will need permission to the network share. User and Group Permissions on Network Shares NOTE: The following is an example of how to assign user and group permissions on a network share. It is not intended to be used in production environments. To assign User and Group permissions, ensure the Users and Groups object types is selected in the “Select Users, Computers, Service Accounts, or Groups” dialog window. If either is not shown in the object types, click the Object Types button and select the Users and Groups object types. Computer Permissions on Network Shares NOTE: The following is an example of how to assign computer permissions on a network share. It is not intended to be used in production environments. To assign computer permissions, ensure the Computers object types is selected in the “Select Users, Computers, Service Accounts, or Groups” dialog window. If Computers is not shown in the object types, click the Object Types button and select the Computers object types. Shared Macros in Alteryx Designer Now that you have created a network share for your macros, and assigned user/group/computer permissions, it is time to create a macro repository in Alteryx. Once you have added a macro repository to your Alteryx Designer, the macros will appear in the tool palette and be searchable using the search toolbar. To create a macro repository, proceed as follows: Open Alteryx Designer Go to Options > User Settings > Edit User Settings and click on the Macros tab Click to add a macro repository In Category Name, type a name. Macros will appear in the tool palette under the Category Name defined here. The default name is Macros Click to browse to the location where you save macros on your computer or a network or paste the file path to the network share containing the macros Click the OK button on the “Add Search Path for Macros” dialog window Click the OK button on the User Settings dialog window Once you have completed the steps above, the macros will appear in the Alteryx Designer tool palette under the category name specified in step 4. NOTE: Sub-folders in a search path cannot be added individually if their parent folder already exists in the Macros repository. If you want sub-folders to display in different tool categories, you will need to remove the parent folder and add each sub-folder individually. Shared Macros in Alteryx Server To make the macros available to workflows published to your Alteryx Server environment, you will need to create the macro repositories on your Alteryx Server. To ensure the path to macros in workflows match between the Alteryx Designers systems and the Alteryx Server, the macro repositories will need to match those created on your Alteryx Designer users’ systems. To create a macro repository, proceed as follows: Open Alteryx Designer as an Administrator on your Alteryx Server Go to Options > User Settings > Edit User Settings and click on the Macros tab Click to add a macro repository In Category Name, type a name. Macros will appear in the tool palette under the Category Name defined here. The default name is Macros Click to browse to the location where you save macros on your computer or a network or paste the file path to the network share containing the macros Click the OK button on the “Add Search Path for Macros” dialog window Click the OK button on the User Settings dialog window Once you have completed the steps above, the macros will appear in the Alteryx Designer Tool Palette under the category name specified in step 4. NOTE: In a multi-node server deployment, you will need to create the macro repositories on each node. After creating a macro repository on one server, you can copy and paste the newly created .ini config file (located at C:\ProgramData\Alteryx\DataProducts\AddOnData\Macros) to the same path on each server in your Alteryx Server environment. Frequently Asked Questions Q. When I publish a Workflow to my Alteryx Server environment, do I need to do anything else? A. No. When you create a macro repository, Alteryx Designer sees macros contained within the directory as a “native macro” and references the macro using relative paths. When you publish the Workflow to Alteryx Server, the macro will continue to be referenced using a relative path based off the repository path defined in your Alteryx Server environment. You can verify that the macro is not being packaged with the workflow by checking the Workflow Options -> Manage Workflow Assets in the Save As dialog window. Q. I’ve made a change to one of my macros. How do I deploy the latest macro to all the published Workflows in my Alteryx Server environment? A. When you save the macro to the network share, it will automatically be updated for every workflow that references the macro in the macro repository you created. Q. I have multiple environments, dev, staging, and production. I would like to ensure changes to macros are properly vetted before being released to production. Will this work for my needs? A. Yes! For this to work, you can create a file share for each environment and assign the appropriate permissions to each environments file share. When adding the macro repositories to each environment, you can supply the environment specific macro repository path. When users make any changes to macros, they should save the new version to the dev file share. You can then test the updates to validate the changes before moving the updated macro to the staging and then production file shares. NOTE: To ensure a seamless transition between the Alteryx Server environments, it is important to ensure the folder/file structure matches in each of the environment-specific file shares. Q. Can I use a mapped network drive to share my organizations macros with Alteryx Designer users and Alteryx Server? A. As mapped network drives are mapped on a per user basis and do not appear to batch processes, using a mapped network drive will not work for sharing macros with Alteryx Server. It will, however, work if you are only sharing macros between Alteryx Designer users within your organization.
The Alteryx Analytic Gallery
What is an Analytic Application?
Pre-packaged data and analytic integration published to the Alteryx Analytics Gallery by Data Artisans to answer specific strategic analytics questions. What is the Analytics Gallery?
The Analytics Gallery is a publicly hosted web service where applications can be published, securely shared, and run in the cloud.
What is a Viewer?
A Viewer is a free user of the Analytics Gallery. A Viewer can run all applications published in the Public Gallery.
What is a Member?
A Member is a user who can run applications that are shared privately through Collections. A Membership is granted by a Data Artisan. A Member also shares the privileges of a Viewer to run all applications published in the Public Gallery.
What is a Data Artisan?
A Data Artisan is a user who creates analytic applications using the Alteryx Designer Desktop and then shares them publicly and/or privately in the Analytics Gallery. A Data Artisan also shares the privileges of a Member.
What is required to run applications in the Public Gallery?
Anyone can sign up and become a Viewer, with the ability to run all applications in the Public Gallery, for free. As soon as you confirm your email, you will have access to the Public Gallery.
What is required to run an application in a private Collection?
You must be a Member to run applications shared in private Collections. Memberships are granted by Data Artisans, who create and share applications.
What is required to build applications?
Applications are built with Alteryx Designer Desktop. Download the Designer Desktop Free Trial.
What is required to publish applications in the Analytics Gallery?
Applications are published from the Alteryx Designer Desktop into a private Studio.
A Studio is automatically created for license holders of the Designer Desktop.
Trial users of the Designer Desktop can set up a Studio with a 30-Day Studio Free Trial
A user with the Designer Desktop and a private Studio is known as a Data Artisan.
How do I run an application?
Click on the title of an application to view application details and click the Run button; or simply click the icon.
Configure the application to suit your needs. Depending upon the application, you might be prompted to enter an address for geocoding, to input a customer file for demographic analysis, or to select data from a range of choices that apply to your business.
Click the Run button at the bottom of the application.
What are the results of running an application?
Applications can be authored to create a variety of different reports and data outputs. When the application processing finishes, the results will appear in the same window as the questions you answered before running the application.
Reports can be previewed after an application has completed by clicking on the Preview link.
Additionally, results for applications that have been run can be found in the application detail view and the "App Results" tab on the left of the screen.
What kinds of reports can an application create?
Depending upon how the application was built, it may produce Word, Excel, HTML, and/ or PDF files, containing a variety of text, tables, charts, and maps.
What kinds of tabular and spatial data output can an application create?
Depending upon how the application was built, it may produce CSV, MDB/ ACCDB, DBF, FlatFile, MID/ MIF, SHP, TAB, YXDB, and/or KML files.
I ran an application but I closed the window before it finished running. How can I view the results?
Application results are stored with your account and can be accessed at any time. As long as you are signed in, the results of any applications that have finished running can be found in two places:
Under the application details page for an application.
Under "App Results" (visible on the left side of the screen when you are signed in).
How can I view more details about an application?
Click on the name of an application to view details, such as the upload date, description, author, studio, copyright, and number of times run. The application details page also includes buttons enabling you to Run, Share, and (if enabled) Download the application.
What browsers are supported by the Analytics Gallery?
We always test and support the latest versions of the most popular web browsers. For more detail about specific browser versions see ‘System Requirements’ of the Technical Specifications page.
How can I find the applications I need?
Each section of the Analytics Gallery features a context-sensitive Search field you can use to find applications.
Searching in the Public Gallery returns applications in the Public Gallery.
Searching in the Studio tab returns applications in your Studio.
Searching in a Collection returns applications in the Collection.
Additionally, a Collection created by you will offer a second search window, which allows you to find applications in your Studio and add them to your Collection
Publishing and Sharing Applications
What is a Studio?
A Studio contains all of the applications published by the Data Artisans within an organization.
Who has access to the applications published in a Studio?
All of the Data Artisans within an organization, and only those Data Artisans, can view and run any applications in their Studio.
How can I rename my Studio?
Click on your User Name to go to your Settings.
Select the Studio Tab.
Enter a new name in the Studio Name field.
Click the save button.
How can an application be shared?
When an application is published in a Studio, all Data Artisans belonging to that Studio can access it.
An application in a Studio can also be shared to the Public Gallery, where anyone can access it.
An application in a Studio can also be shared in a Collection. Any users added to the Collection can access it.
As a Data Artisan, how can I share an application privately with someone?
Publish an application from the Designer Desktop to your private Studio.
Add the application to a Collection.
Add the User to the Collection. In order to run the application, the user must be a Member.
As a Data Artisan, how do I grant a Membership to someone?
Click on your User Name to go to your Settings.
Select the Studio Tab.
In the Members section, enter an Email address or User Name.
As a Data Artisan, how can I tell how many Memberships I have to distribute?
Click on your User Name to go to your Settings.
Select the Studio Tab.
Find "Memberships available to distribute" in the Members section.
How can I purchase additional Memberships?
Please contact Sales@Alteryx.com.
What applications can be added to a Collection?
Only applications published in the Data Artisan's Studio may be added to a Collection. Applications in the Data Artisan's Studio may also (at their discretion) be shared in the Public Gallery. However, applications in the Public Gallery that were published from other Studios cannot be added to a Collection.
Can an application be added to more than one Collection?
As a Data Artisan, do I also need a Membership?
No, Data Artisans are also Members.
I am a Data Artisan or Member. I want to run an application shared with me from a different organization. Do I need a Membership from that organization? No. A single Analytics Gallery Membership entitles you to run private applications shared from any Collection.
As a Data Artisan, how can I add another Data Artisan to my Studio?
Please contact firstname.lastname@example.org for assistance.
My organization has more than one Data Artisan. Who controls the distribution of Memberships?
At present, all Data Artisans have equal access to Membership distribution under Studio Settings.
What types of users can be added to a Collection?
Data Artisans, Members, and Viewers can all be added to a Collection. You can even enter the email address of someone who has not yet visited the Analytics Gallery.
Can a Viewer who is added to a Collection run the applications in the Collection?
Only those applications in the Collection that have also been shared in the Public Gallery by the Data Artisan can be run by the Viewer.
What types of users can run private applications in a Collection?
If an application in a Collection has not been shared in the Public Gallery, Viewers (who have been invited to join the Collection) can view the application, but cannot run it. Only Data Artisans and Members can run the application.
How can I find users to add to a Collection?
Select the Collection and use the Search Users field on the right. Any registered users of the Analytics Gallery that match your search terms will be returned.
Additionally, you can add someone who has not registered with the Alteryx Analytics Gallery by entering a valid email address. An invitation will be sent.
Is there a limit to the number of applications or users I can add to a Collection?
When I add a new application to a Collection, are the users in that Collection notified?
Can I allow users within my Collection to share it with others?
Each Collection includes a checkbox on the upper right that states "Other users may share this collection." When this box is checked, anyone in the Collection will have the ability to add other users to the Collection.
The Data Artisan who created the Collection will see the names of any additional users who are added to the Collection, and can remove them.
I published an application and shared it in a Collection (or in the Public Gallery). Since then, I have made changes to the application in the Designer Desktop. Can I update it? First, select the original version and delete it. Next, re-publish the application and add it to your Collection (or to the Public Gallery)
How can I share an application in the Public Gallery?
Click on the name of an application to view the application details page. Click the Sharing button and choose "Place in Public Gallery."
How can I remove an application from the Public Gallery?
Click on the name of an application to view the application details page. Click the Sharing button and choose "Remove from Public Gallery."
How can I share an application through email or social media?
(Public Gallery applications only) Click on the name of an application to view the application details page. Click the Sharing button to share via email, Twitter, Facebook, and Google+.
What is "private data?"
A license of the Alteryx Designer Desktop may include a variety of private data sets, including demographic data, psychographic data, business list and consumer list.
Can I publish applications using private data?
Yes, applications using private data can be published in your private Studio and can be shared in Collections. They cannot be shared in the Public Gallery.
What data is allowed in the Public Gallery?
Please see Alteryx Analytics Gallery Data Inventory
What capabilities in the Designer Desktop cannot be used in the Analytics Gallery?
The following tools are prohibited in applications published in the Analytics Gallery.
Run Command tool
Run Command event
R tool (Macros included in the Designer Desktop that use the R tool are permitted.)
Send Email event
I built an application that uses a prohibited tool in a safe manner. How can I apply for an exemption?
Email email@example.com and explain how and why each prohibited tool is used, along with the general purpose of the application.
Publish the application in your Private Studio and check the box "Others may download this application."
Add the application to a Collection and share it with firstname.lastname@example.org.
Your application will be reviewed and an exemption may be made to allow it to be run.
What tool configurations or question types cannot be used in the Analytics Gallery?
Input and output files referenced by Tools must be in the same directory as the application.
The application Question type "Folder Browse" cannot be used in applications published to the web.
In the application Question type "File Browse," the "Save As Dialog" configuration cannot be checked.
Application results (under analytic application properties) cannot include Browse tools.
Are there limits to the file size of applications and/or data published in the Analytics Gallery?
Yes, applications and data are limited to 100MB.
What are my options if I want to publish an application and data that exceed 100MB?
Please use the Cloud Connector tools within the Designer Desktop to host your data on the cloud.
Are chained applications supported in the Analytics Gallery?
At present, chained applications are not supported.
I forgot my password. How can I reset it?
Click Sign In and click the Forgot Password link. Enter the email address associated with your account and a new password will be emailed to you.
Can I download an application?
Yes, many applications can be downloaded. View application details and click the Download button. Use the Alteryx Designer Desktop to open the *.YXZP files that are downloaded. Go to Designer Desktop Free Trial to get started if you're not already an Alteryx customer.
I need help with my account. Who should I contact?
Please log a case at www.alteryx.com/community.
I want to change the email address associated with my account. Who should I contact?
First, go to gallery.alteryx.com and sign in with your current email. Confirm that you have accepted the licensing terms and conditons. Then log a case with www.alteryx.com/community and we will help you reassign your account.
I found a bug on the Analytics Gallery or in an application. Who should I contact?
Please log a case at www.alteryx.com/community.
How can I purchase additional Memberships, Data Artisan accounts, or extend my subscription?
Please contact Sales@alteryx.com.
How can I recommend a feature for the Analytics Gallery?
Please send your feedback to GalleryFeedback@alteryx.com.
Where can I connect with other Alteryx users to ask questions and learn about best practices?
Who is the better captain, Kirk or Picard?
This is the second article in a series on Alteryx Server backup and recovery. You can find Part 1 at: Alteryx Server Backup & Recovery Part 1: Best Practices As long as a backup of the Mongo database is available, you can get Alteryx Server back up and running. Luckily, backing up the embedded MongoDB is pretty simple, and can be done with a few console commands. I would recommend creating a batch file or script to perform the process. Doing so will allow you to schedule the backup using Windows Task Scheduler. The actual steps to perform a MongoDB backup are covered in detail in the online help under the server configuration section or at this direct link. I will also outline the steps below for completeness. To create a backup of the MongoDB: Stop AlteryxService. Execute the following command to save a backup of the database in the specified folder: alteryxservice emongodump=<path to backup location> Restart AlteryxService You can easily script this to a batch file with a few simple console commands. Keep in mind that paths may vary on your server, but it should look something like this. Example: "C:\Program Files\Alteryx\bin\AlteryxService.exe" stop "C:\Program Files\Alteryx\bin\AlteryxService.exe" emongodump=Z:\Path\MongoBackup "C:\Program Files\Alteryx\bin\AlteryxService.exe" start You can add additional features, such as logging and date/time stamps, to the backups. As an example of additional useful features to include with your backups, I have included the code for a batch script I created that adds the following information: logging with date/time stamping, a backup that is also date/time stamped, automated archival of the backup, copying the archive to a network location, and cleanup of the temp files. Once you have a batch file or other script to perform your backups, you need to test the script to ensure it works properly. Once testing is done, the next step is to schedule the backup. The easiest way to do this is to use Windows Task Scheduler. To create a scheduled task on Windows 2012 Server, follow these steps: Create a scheduled task: Open Task Scheduler and click on “Create Task” On the General tab, enter “Name”, “Description”, select “Run whether user is logged in or not", and select "Run with highest privileges" On the Triggers tab, click “New” A dialogue box will appear. Define the schedule (daily, weekly, etc...) on which you want the backup to run and click “OK” On the Actions tab click “New” On the dialogue window, make sure “Start a Program” is selected and click “Browse”. Select the batch file you created and click “Open”. Then click “OK”. Click “OK” on the Create Task window to finalize the creation of the backup task. Now that you have successfully implemented backup procedures and scheduled a task to automate the backups, it is time to discuss database restoration from a backup. The good news is that restoring the database is just as simple as backing it up. Assuming that 1) the server is functioning, 2) Alteryx Server is installed, and 3) you have a valid backup available, you can follow these simple steps outlined below. To restore a backup of the MongoDB: Stop AlteryxService Execute the following command to restore the backup: alteryxservice emongorestore=<path to backup location>,<path to restore to> Restart AlteryxService This simplicity and same focus on command line statements means that we can also script recovery. However, since recovery actions are much less frequent, it probably isn't necessary. Instead, you would just connect to the server, open a command prompt and, following our backup example above, execute the following commands: Example: "C:\Program Files\Alteryx\bin\AlteryxService.exe" stop "C:\Program Files\Alteryx\bin\AlteryxService.exe" emongorestore=Z:\Path\MongoBackup,C:\ProgramData\Alteryx\Service\Persistence\MongoDB "C:\Program Files\Alteryx\bin\AlteryxService.exe" start For Alteryx Server we also recommend backing up the controller token and some settings files. While the server can be recovered without these files. Having a backup of them can expedite the recovery process, and they will also ensure you will be able to decrypt any sensitive data in the database. The settings files we recommend backing up are: C:\ProgramData\Alteryx\RuntimeSettings.xml C:\ProgramData\Alteryx\Engine\SystemAlias.xml C:\ProgramData\Alteryx\Engine\SystemConnections.xml Again, please keep in mind the exact paths may vary depending on the server configuration and where the backup is located. This example also assumes the backup isn't compressed/archived. If you are using a backup script that archives the backup and copies it to network storage, you will need to copy the backup file to the server and decompress the archive before running the recovery commands above. Below is the code for my sample batch script: ::----------------------------------------------------------------------------- :: :: AlteryxServer Backup Script v.2.0.2 - 01/04/19 :: Created By: Kevin Powney :: :: Service start and stop checks adapted from example code by Eric Falsken :: ::----------------------------------------------------------------------------- @echo off ::----------------------------------------------------------------------------- :: Set variables for Log, Temp, Network, and Application Paths :: :: Please update these values as appropriate for your environment. Note :: that spaces should be avoided in the LogDir, TempDir, and NetworkDir paths. :: The trailing slash is also required for these paths. ::----------------------------------------------------------------------------- SET LogDir=C:\ProgramData\Alteryx\BackupLog\ SET TempDir=C:\Temp\ SET NetworkDir=\\ServerName\SharePath\ SET AlteryxService="C:\Program Files\Alteryx\bin\AlteryxService.exe" SET ZipUtil="C:\Program Files\7-Zip\7z.exe" :: Set the maximium time to wait for the service to start or stop in whole seconds. Default value is 2 hours. SET MaxServiceWait=7200 ::----------------------------------------------------------------------------- :: Set Date/Time to a usable format and create log ::----------------------------------------------------------------------------- FOR /f %%a IN ('WMIC OS GET LocalDateTime ^| FIND "."') DO SET DTS=%%a SET DateTime=%DTS:~0,4%%DTS:~4,2%%DTS:~6,2%_%DTS:~8,2%%DTS:~10,2%%DTS:~12,2% SET /a tztemp=%DTS:~21%/60 SET tzone=UTC%tztemp% echo %date% %time% %tzone%: Starting backup process... > %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: Stop Alteryx Service ::----------------------------------------------------------------------------- echo %date% %time% %tzone%: Stopping Alteryx Service... >> %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log SET COUNT=0 :StopInitState SC query AlteryxService | FIND "STATE" | FIND "RUNNING" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO StopService SC query AlteryxService | FIND "STATE" | FIND "STOPPED" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO StopedService SC query AlteryxService | FIND "STATE" | FIND "PAUSED" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO SystemError echo %date% %time% %tzone%: Service State is changing, waiting for service to resolve its state before making changes >> %LogDir%BackupLog%datetime%.log SC query AlteryxService | Find "STATE" timeout /t 1 /nobreak >NUL SET /A COUNT=%COUNT%+1 IF "%COUNT%" == "%MaxServiceWait%" GOTO SystemError GOTO StopInitState :StopService SET COUNT=0 SC stop AlteryxService >> %LogDir%BackupLog%datetime%.log GOTO StoppingService :StopServiceDelay echo %date% %time% %tzone%: Waiting for AlteryService to stop >> %LogDir%BackupLog%datetime%.log timeout /t 1 /nobreak >NUL SET /A COUNT=%COUNT%+1 IF "%COUNT%" == "%MaxServiceWait%" GOTO SystemError :StoppingService SC query AlteryxService | FIND "STATE" | FIND "STOPPED" >> %LogDir%BackupLog%datetime%.log IF errorlevel 1 GOTO StopServiceDelay :StopedService echo %date% %time% %tzone%: AlteryService is stopped >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: Backup MongoDB to local temp directory. ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Starting MongoDB Backup... >> %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log %AlteryxService% emongodump=%TempDir%ServerBackup_%datetime%\Mongo >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: Backup Config files to local temp directory. ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Backing up settings, connections, and aliases... >> %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log copy %ProgramData%\Alteryx\RuntimeSettings.xml %TempDir%ServerBackup_%datetime%\RuntimeSettings.xml >> %LogDir%BackupLog%datetime%.log copy %ProgramData%\Alteryx\Engine\SystemAlias.xml %TempDir%ServerBackup_%datetime%\SystemAlias.xml copy %ProgramData%\Alteryx\Engine\SystemConnections.xml %TempDir%ServerBackup_%datetime%\SystemConnections.xml %AlteryxService% getserversecret > %TempDir%ServerBackup_%datetime%\ControllerToken.txt ::----------------------------------------------------------------------------- :: Restart Alteryx Service ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Restarting Alteryx Service... >> %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log SET COUNT=0 :StartInitState SC query AlteryxService | FIND "STATE" | FIND "STOPPED" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO StartService SC query AlteryxService | FIND "STATE" | FIND "RUNNING" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO StartedService SC query AlteryxService | FIND "STATE" | FIND "PAUSED" >> %LogDir%BackupLog%datetime%.log IF errorlevel 0 IF NOT errorlevel 1 GOTO SystemError echo %date% %time% %tzone%: Service State is changing, waiting for service to resolve its state before making changes >> %LogDir%BackupLog%datetime%.log SC query AlteryxService | Find "STATE" timeout /t 1 /nobreak >NUL SET /A COUNT=%COUNT%+1 IF "%COUNT%" == "%MaxServiceWait%" GOTO SystemError GOTO StartInitState :StartService SET COUNT=0 SC start AlteryxService >> %LogDir%BackupLog%datetime%.log GOTO StartingService :StartServiceDelay echo %date% %time% %tzone%: Waiting for AlteryxService to start >> %LogDir%BackupLog%datetime%.log timeout /t 1 /nobreak >NUL SET /A COUNT=%COUNT%+1 IF "%COUNT%" == "%MaxServiceWait%" GOTO SystemError :StartingService SC query AlteryxService | FIND "STATE" | FIND "RUNNING" >> %LogDir%BackupLog%datetime%.log IF errorlevel 1 GOTO StartServiceDelay :StartedService echo %date% %time% %tzone%: AlteryxService is started >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: This section compresses the backup to a single zip archive :: :: Please note the command below requires 7-Zip to be installed on the server. :: You can download 7-Zip from http://www.7-zip.org/ or change the command to :: use the zip utility of your choice as defined in the variable above. ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Archiving backup... >> %LogDir%BackupLog%datetime%.log %ZipUtil% a %TempDir%ServerBackup_%datetime%.7z %TempDir%ServerBackup_%datetime% >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: Move zip archive to network storage location and cleanup local files ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Moving archive to network storage >> %LogDir%BackupLog%datetime%.log echo. >> %LogDir%BackupLog%datetime%.log copy %TempDir%ServerBackup_%datetime%.7z %NetworkDir%ServerBackup_%datetime%.7z >> %LogDir%BackupLog%datetime%.log del %TempDir%ServerBackup_%datetime%.7z >> %LogDir%BackupLog%datetime%.log rmdir /S /Q %TempDir%ServerBackup_%datetime% >> %LogDir%BackupLog%datetime%.log ::----------------------------------------------------------------------------- :: Done ::----------------------------------------------------------------------------- echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Backup process completed >> %LogDir%BackupLog%datetime%.log GOTO :EOF :SystemError echo. >> %LogDir%BackupLog%datetime%.log echo %date% %time% %tzone%: Error starting or stopping service. Service is not accessible, is offline, or did not respond to the start or stop request within the designated time frame. >> %LogDir%BackupLog%datetime%.log
Have you ever built an Alteryx App only to realize that some part of the process must remain in Excel? Instead of abandoning your Alteryx App all together, you may be able to use the Alteryx API and call your app from Excel. We’ve put together all the necessary VBA code so that it should be quick and easy for you to call an Alteryx App from Excel and get the results back. The Alteryx app for our sample, API Tester.yxzp, has been included in case you want to upload it to your private gallery and test out the Excel to Alteryx API using your Alteryx server.
SAMPLE EXCEL FILE - Input
We are going to be working with the attached “Reverse String.xlsm” to demonstrate the API. Suppose you wanted to reverse a string in excel (“Hello World” should be converted to “dlroW olleH”). You can’t quite get it in Excel, but you could quickly use the ReverseString function in Alteryx. Now the only trick is getting your data from Excel to Alteryx and back to Excel. We’ll have the user enter the string on cell E5 and then hit the Run Alteryx Button. Cell E6 will then be the results we get back from Alteryx
HOW TO SETUP THE VBA
When working with the Alteryx API, you need to setup some settings/configurations in your excel file before you can deploy it. If you open up the VBA editor (Alt + F11), there is Sub called Doer where we will have to enter a few key settings that apply to your Alteryx App. This is a one time setup for each different application that you setup.
strKey – this is your unique Alteryx Key. It is unique to all the apps in your private studio. It can be found here for the Alteryx public gallery
strSecret – this is your unique Alteryx Secret. It is unique to all the apps in your private studio. It can be found here for the Alteryx public gallery
strAppID – this is your app’s unique ID. When you look at your app in a browser, the appID is the unique ID at the end of the URL. For our sample, our AppID “589b70eceffc2a0bb0a2d530” can be found at the end of the App’s URL
AlteryxURL – this is the base URL where the app resides. For the public gallery, it is : https://gallery.alteryx.com. You would switch this your URL if you were going to use your private gallery. A private gallery would be of the format resembling: https://server.domain.com/gallery.
Data – Any data that needs to be passed from Excel to Alteryx can be saved as string variables in the VBA. For our simple app, we’re only passing one item, the string that we want reversed. In order to pass more complex data, we’ve found it easier to save the data to a .csv and then have the Alteryx App read the .csv as part of the app.
strQuery – This is the entire set of information that is being sent from Excel to the API for processing. It’s in JSON format. For each item, you need a name and value. The name corresponds to the interface tool’s name in your Alteryx App. The value corresponds to the value that want to set. From our Alteryx App, you can see that we’ve given our textbox tool the name “input_string”. For the value, we’ll be passing whatever string the user enters into excel.
To see all the questions for a given app, the API documentation is immensely helpful. After you enter your key and secret, you would go to the second GET, type in the appID, and then try it out to get a list of the name value pairs that we must send from Excel to Alteryx. Note that you only send the name and value fields from the response body.
Save – This variable is a Yes or No answer for whether or not you want to save the data coming back from Alteryx. In this case we would say Yes. For more complex apps, we may have our Alteryx workflow save the data to a network folder that our excel VBA would go grab once Alteryx is done. That post run coding would be added under the Part_Deux sub in the VBA editor. There we would have Save=”No”
Output_Name – this is the column name of the output data that we want to retrieve from Alteryx. In our sample, the column Name is “Output_String”. This only applies if Save=”Yes”
SaveLocation – this is the cell range where the output should be written. This process currently only supports writing one cell of data back to excel. Anything more complicated should be handled through custom VBA in the Part_Deux sub. This only applies if Save=”Yes”
NOTES ABOUT WHAT IS GOING ON BEHIND THE SCENES
While I won’t go through everything that is going on in the background, here are some key points:
Ensure that you have references to Microsoft XML, 6.0 if any errors pop up.
The VBA takes all the settings and adds the time and a random string before posting a request to the Alteryx Server to run the job in the RunAlteryx sub. It has to combine all these items, URL encode certain parts, create a base64 hash, and send this to the Alteryx server in just the right order.
It then makes a Get request to check the status. If the status is complete, then the VBA moves on to get the results; otherwise, the VBA creates another request to check the status in 1 second. Note that Excel will be operational during this time since it’s not during any work. This loop will continue until the status is either completed or error. Note that it will update the status on the bottom left of your screen to indicate that Excel is waiting on Alteryx to run the job.
Once the Alteryx app returns a completed status, the VBA will then make another get request for the output that you’ve requested (only if save=”Yes”). If Save=”Yes”, the VBA then saves the output to the specified cell.
If you want to write any of your own code that should execute when the code is done, place it in the part_Deux sub. For example, perhaps you have a private server setup where the Server will write an output file to a network folder that excel can read in from. The code in part_Deux might look something like the below:
Dim ActBook As Workbook
Dim FromAlteryx As String
FromAlteryx = "\\server\" + Environ$("username") + "_out.csv"
Set ActBook = ThisWorkbook
On Error GoTo 0
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
Workbooks(Environ$("username") + "_out.csv").Close
SAMPLE EXCEL FILE - Output
Assuming we have everything setup correctly, our app should return the reverse of the string that is input:
Alteryx Server provides a fully scalable architecture that allows an organization to scale Alteryx to automate data analytics, tackle bigger projects, process larger datasets and put self-service data analytics into the hands of more decision makers. From scaling Worker nodes to Gallery nodes to the MongoDB persistence layer, Alteryx Server allows organizations to efficiently manage their automated and self-service data analytics needs.
Now, find all your Server and Gallery questions and answers in one place! The new Gallery Admin Help Page has your Server Installation Guide, Configuration instructions, and the much-requested Administer Gallery management features - Subscriptions and Studios defined! Manage your user permissions! Edit user accounts!
As more and more users become familiar with macros it is useful to know the potential ways of scaling and sharing these insights within your business.
Here are just a few ways to achieve this aim!
Push latest macros to users/automatically ensure that users are using the latest version
Alteryx Designer Desktop
Working with colleagues and sharing macros?
Within the Alteryx designer you can create your own macro ‘Parent Category’. When specifying a file path, you can choose either a local or a network/mapped drive. If you are building macros within a team and looking to share or update macros dynamically, having a mapped location will allow you to reflect any changes on everyone’s machines.
As a best practice when overwriting a macro it would be best to update the Meta-data tab (Within workflow properties tab) within the macro to add initials or details of what has changed. This can help you track who edited each version. Unfortunately, if you choose to use an overwrite function, you will be unable to control the version of the macro overtime.
Therefore, you may choose to add “V1” etc. to the macro when saving it to the network location. This macro parent category could then be used as a development location and then you could have another macro parent category where you publish production ready macros.
The Alteryx Server can adopt a similar outline to that of the Alteryx Designer however, it has a greater flexibility in terms of version control. When building a macro you can publish it with a description.
Then when a change is made to the macro you can press the save icon and add another description.
Within the gallery this is then reflected when you click on the macro and click on the version number. You then have the capability of running & publishing up and down versions.
Include macro pack as part of installation procedure for new users
You could zip all the macros together and get a user to extract them to their own macro folder (mentioned above).
Or to the Admin (C:\Program Files\Alteryx\bin\RuntimeData\Macros) or Non-admin (C:\Users\%USER%\AppData\Local\Alteryx\bin\RuntimeData\Macros) folders.
If you use the metadata tag when building the macro workflow it can land in that parent category as well.
Alteryx Server on Azure
To work with Alteryx Server on Azure, you will need:
An Azure subscription. If you don’t have an Azure subscription, you can sign up for a free trial.
Microsoft Remote Desktop (RDP) software. Remote Desktop is used to connect to the virtual machine (VM) running Alteryx Server.
An Alteryx Server license.
An Alteryx Server installer. Installers can be downloaded from alteryx.com.
Select your Windows Server version and VM size
Select a Windows Server version and VM size that meets or exceeds the system requirements for Alteryx Server. Take a look at Azure’s VM size table to see what size best fits your needs. Make sure to consider price vs. performance. Larger VMs perform better but cost more.
Step 1: Create a VM
1. Log in to the Azure portal.
2. Click on the Newbutton in the top left.
3. Click on Virtual Machines
4. Choose a version of Windows Server. Select Windows Server 2012 R2 Datacenter if you don’t have a preference.
5. At the bottom of the page, click the Create button.
6. Fill out the required information in the Basicssection of the Create Virtual Machine pane. Click the OK button at the bottom to move on after you’ve filled out the required fields.
Name: A name for your VM.
User name: A user that will have the ability to RDP into the VM.
Password: The password for the above user.
Subscription: If you have multiple subscriptions, choose which subscription to put the VM in.
Resource group: Resource groups help group together related VMs. Either create a new resource group or place the new server into an existing group of similar resources.
Location: Where you’d like the server to be placed. You should select a location that will be closest to your users for optimum performance.
7. In the Sizesection, choose a size that meets the tech specs for Alteryx Server. When ready, click the Select button at the bottom.
8. In the Settingssection, configure the various settings for how you’d like to configure the VM. Generally, you’ll want to leave the defaults in place. For Availability Set select None. Click the OK button at the bottom when done.
9. Review the VM settings in the Summarypane and make sure everything looks correct. Click the OK button at the bottom when ready.
10. Click on the VM once it’s been deployed. Click Settings > Network Interfaces > $INTERFACE > Network security group > Inbound security rules > Addto start adding a new rule to the security group.
11. Add a rule for HTTP access. This will allow installations of Alteryx Designer to talk to the Alteryx Server VM. Give the rule a name and change the Protocol to TCP. It is highly recommended to change the Source setting to be locked down to an IP address or an IP range that you control. When finished, click the OK button. Add more access rules as needed for any other IP addresses or IP ranges.
Step 2: Connect to the VM
Click on the Virtual Machinesentry on the left side of the page.
Click on the VM’s name in the list.
Click on the Connect This will download an .rdp file for Remote Desktop connections.
Open the file downloaded in the previous step. If you see a warning that the publisher of the remote connection can’t be identified, click Connect. This will open a new Remote Desktop connection. Enter the user name and password set during VM creation.
Step 3: Install Alteryx Server
Installing Alteryx Server in Azure is similar to installing on any other server.
Note: If you plan on using a Gallery with Windows authentication, you’ll need to set up Active Directory in Azure. For more information, see Install a replica Active Directory domain controller in an Azure virtual network in the Azure documentation.
Download the installer from alteryx.com. Note: The default security policy of Internet Explorer in Azure is set to High. This means that you’ll have to manually add downloads.alteryx.comto your list of trusted sites. OR
Copy the installer from your computer. If you’ve already downloaded the Alteryx Server installer to your computer, you can copy it as you would any other file into a folder on the Azure VM.
Double-click on the installer from the Azure VM. This process is the same as installing Alteryx Server on any other computer.
Step 4: Connect to Alteryx Server
Activate your license.
Get the Controller Token from the Azure VM from the Alteryx System Settings
Open port 80 on the Windows Firewall.
In Alteryx Designer, go to Options > Schedule Workflow.
In the Controllerdropdown, select Connect to Controller...
Paste in the DNS name or IP of the Azure VM and the Alteryx Server Controller Token from Step 2.
I have encountered a few situations recently that resulted in data loss because a backup of the Alteryx Server wasn't available. I can't stress enough the importance of regularly backing up your server. This article, the first of two-part series, will cover some options and best practices to ensure you have the necessary backups available in the event they are needed. Part II will focus on the embedded MongoDB instance provided with the Alteryx Server install. If you are utilizing a user-managed MongoDB instance, please refer to MongoDB's documentation for backup and recovery procedures at https://docs.mongodb.org/manual/administration/backup/.
Let's go over some widely accepted best practices for backing up servers and databases:
Schedule Regular Backups - Backing up consistently on a scheduled basis is key to ensure you minimize data loss and downtime. I recommend backing up nightly during non-peak hours to minimize potential impact to users and for the minimal amount of data loss in the case of a crash or another failure. If backing up nightly isn't feasible, scheduling weekly backups is also an option. The important thing is to set a regular schedule.
Keep Historic Backups for a Defined Period - Sometimes the unexpected happens and a backup fails, becomes corrupt, gets lost/deleted, or the issue isn't noticed immediately (causing the problem state to be present in the backups). Having historic backups available helps ensure you have a backup available, and allows you to choose one created before the issue began.
Store Backups on Network or SAN Storage - Storing your backups on the same server where the data resides runs the risk of those backups not being available during a failure event. Let's consider what happens when your server suffers a disk failure. If the backups are stored locally on that disk, then they are gone too, making recovery impossible. However, if your backups are stored on the network they would not be impacted by a failure event on the server.
Keep a Copy of the Backup Off-Site - This falls along the same lines as above. If the only backups are on a file server in the same data center as the Alteryx Server, and that data center suffers a disaster, you will lose both your server and your backups. Keeping an additional copy offsite will allow you to bring the server back up in the Cloud or at another data center if need be.
Validate your Backup Files - You should periodically check to ensure your backups are occurring successfully, and confirm that the backups are valid and usable. There is nothing worse than putting a backup process in place and then finding out after a failure occurs that the backups stopped working 6 months ago or that all of your backups aren't usable.
Practice your Recovery Procedures Regularly - Recovery drills allow you to become familiar with the restoration process and the amount of time needed to return to a fully functional state in the event of a disaster. Practice is also proven to reduce the occurrence of mistakes, and can save valuable time. I recommend running a recovery drill quarterly or bi-yearly.
Keep in mind that, in most cases, backing up the entire server including the OS and all data isn't necessary. In fact, it can actually significantly increase the average time to restoration. Instead, I would recommend backing up only the critical data and configuration files for the server. This is because it is significantly faster to clean install the server and necessary software, and then restore the backed up data/configuration than it is to restore the entire server. This is especially true in the case of virtual servers, as deploying a new virtual server takes minutes in most cases. These limited backups can also reduce the time it takes to complete and validate the backups and reduce the storage needs/costs involved in keeping those backups.
Part 2 - Alteryx Server Backup & Recovery Part 2: Procedures
Question How do I find my Gallery API Key and Secret?
Answer In order to be able to find your Gallery API Key and Secret, your Private Gallery account must first be API Enabled. To check this, a Gallery Admin will need to log in and go into the Subscriptions section. From there, the Admin can select your user account, and at the bottom there's a setting for API Enabled:
Once that setting is set to "Yes", you can log in to your own account and go into the Settings by clicking the gear icon in the top right corner. From there, click on the Private Studio tab and scroll down to find your API Key and Secret:
Click the "Show" button to reveal your API Secret so you can enter it where requested when working with the API.
Question Is it possible to have multiple administrators for a Gallery Collection?
Answer Yes, as of v10.1 we have added the ability to add additional administrators to Gallery Collections. In the past, the Collection owner was assigned as the sole administrator. In order to add another user as an administrator, the user must also be an Artisan to the Private Studio from which the app was shared. Please follow the steps below to add an administrator to a Collection:
In the Gallery, click on the Collections button.
Click on the Collection you want to add the Administrator.
Click on Users, look for the user, and then click on “Collection Admin”.
Once you've added the Admin permission , the user should now be able to add/update any app/workflow within the Collection.
Prohibited Apps - Apply for Exemption
The following Designer Desktop tools and events are prohibited in the Analytics Gallery due to the numerous possible configurations and the actions that can be performed:
Run Command Tool
Run Command Event
Send Email Event
If you have an application that uses one of the prohibited tools in a safe manner, you are able to apply for an exemption and have a Curator review your application so that it can be run in the Analytics Gallery. To apply for an exemption please follow the steps below:
Email email@example.com and explain how and why each prohibited tool is used, along with the general purpose of the application
Publish the application in your private studio and check the box "Others may download this app."
Add the application to a Collection and share it with Alteryx Curator, firstname.lastname@example.org.
Allow up to 2 business days for your application to be reviewed and an Alteryx Curator to email you the status of your application.