What is an Alteryx workflow?
A workflow in Alteryx is created to do a bunch of different things. A workflow is what you create by dragging and dropping things in the workflow canvas of Alteryx Designer. It is saved to the standard Alteryx file format .yxmd. It contains various tools that perform different functions to process data. To create a workflow, you have to navigate to "File" in the main menu and select the "New Workflow" option. A new workflow canvas opens up. It provides a lot of tools in the tool palette. All you gotta do is drag and drop the tools you need into the workflow canvas. Instead, you can right-click the workflow, where you will get the list of tools that you can select to insert. You can configure the workflow and tools properties. The connections between the tools in a workflow has a downstream direction, vertically or horizontally.
If you want to Explore more about AlterYX? then read our updated article - AlterYX Tutorial
Connect tools
Each tool might have an input and output anchor. After you drag and drop a tool from the tool palette onto the workflow canvas, you have to connect it. When you drag the tool near the output anchor of another tool, the connection will appear automatically. You can also drag the output anchor of the previous tool to the input anchor of your new tool to connect them. The connections will go in from the left side (or top) of the tool and come out of the right side (or bottom) of the tool. Some tools have multiple input anchors, so they accept multiple input connections. The tools with output anchors can be connected to multiple tools. If you want to see the connectors of a tool, click on the tool. The input connector will be represented in green color and the output connector is represented in blue color.
Workflows and tools options
Workflows and tools come with a lot of options that we can select to apply in the workflow. Let's look at some of the various available options.
Tab right-click options
When you click on a workflow tab, you will get a menu with the following options.
Close - It closes the current workflow.
Close All But This - It closes all the opened workflows except the current workflow.
Close All - It closes all the open workflows.
Duplicate - It creates a duplicate of the current workflow.
Tool right-click options
When you select a tool on the workflow canvas and right-click on it, you will get a menu with a lot of options. Here are some of the options from the menu.
Cut - It cuts the selected tool from the workflow canvas.
Copy - It copies the selected tool.
Delete - It deletes the selected tool from the workflow canvas.
Zoom - It lets you zoom in, zoom out, and fit the tools in the workflow canvas.
View Possible Connections - It shows a list of possible tool connections for the selected tool.
Cache and Run Workflow - It runs the current workflow and caches the data up to the selected tool. You can cache multiple tools in a workflow. If you change the configuration of the tool, the cached data will be released.
If you select two or more tools at a time, you can see alignment options. So you can align the tools horizontally or vertically. If you select three or more tools, you can see the distribution options. You can arrange the tools to have even space between them along the horizontal and vertical axis.
Canvas options
The following are the canvas options that the Alteryx workflow has.
Run Workflow - It is used to run the current workflow. Instead, you can run a workflow by using the Ctrl+R shortcut. When the workflow is running, this icon changes to "Stop Workflow".
Stop Workflow - It stops the workflow that is in a running state. You can also stop a workflow using the Ctrl+R shortcut.
Run As Analytic App - It runs the workflow as an analytic application.
Add Workflow to Schedule - You can schedule a workflow to run at a specific time and frequency.
Workflow configuration
A configuration window displays all the options that can be configured for a selected workflow, tool, or connection. You can configure the various settings of the selected tool, workflow, or connection. The configuration options depend on the thing that you have selected. For example, the canvas has configuration options such as Layout Direction, Annotations, and Connection Progress. The options for a workflow are Workflow Path, Workflow Type, and Constants. Memory Limit, Temporary Files, Conversion Errors, and Record Limit for All Inputs are some of the options for runtime. Enable Events, Edit Event, Command Arguments, and Timeout are some of the options for events. The meta info tab consists of Workflow Name, Description, Tool Settings, Tool Palette, etc.
Workflow management
Once you have created a workflow, you can save it in the Designer. You will be able to share these workflows with other users in the Alteryx Gallery or your company's Private Gallery. When you make some changes to your workflow, you can save it and share it back to the gallery. This time, the previous version of your workflow will not be replaced in the Gallery. Instead, the Gallery maintains previous versions of your workflow. You can also access the workflows in the gallery and edit them in your Designer. If your workflow contains dependencies such as documents, files, connections, etc., you can zip the workflow along with its dependencies as a .yxzp file. You can also group multiple workflows into a workflow group (.yxwg).
Schedule workflows
You can schedule a workflow to run at a specific date, time, and frequency. Alteryx provides two location options to run a scheduled workflow.
Alteryx Server - You can schedule to run a workflow to your company's private gallery or to a controller.
Designer plus Desktop Automation - You can schedule to run a workflow on your computer.
The schedule to gallery or controller option is only available if you have an Alteryx Server. You can schedule a workflow in two ways. One way is, open the workflow that you want to schedule and click on the "Workflow to Schedule" icon present at the top of the canvas. The other way is, navigate to "Options" and select "Schedule Workflow".
Workflow optimization
A good workflow practice is to optimize your workflow so it runs better and faster. The following are some of the things that you can do to optimize your workflow.
Remove the unnecessary fields in your stream.
- Limit the number of records passing through a workflow for large data by using the Sample tool.
- You can remove browse tools from your workflow to reduce the amount of memory used.
- Size should be balanced between the objects of source and destination. The selected object from the destination should be the larger file and the selected object from the source should be the smaller file.
- You can configure with the Polygon on the Targets side and the Points on the Universe side.
- Make sure that your local temporary directory has enough space.
Tips and tricks to make your workflow look nice
When you code in a programming language, you follow some coding standards to make the code look nice and understandable. In a similar way, you can clean up your workflow to look nice and understandable when you share it with your peers. Here are some tips that might help you in making your workflow beautiful.
- Use containers to organize workflow tools. You can set separate boxes of logic separately. Add a description to each container.
- Use the annotation tool to write custom descriptions of what is happening inside a tool.
- You can assign the tools in your workflow either horizontally (Ctrl-Shift -) or vertically (Ctrl-Shift +).
Conclusion
The workflows in Alteryx provides the most common methods built-in for data preparation. It also provides built-in functions for merging datasets. It has options for performing predictive analysis. You can even write mathematical calculations in your workflow very easily. Once you get to know how to work with Alteryx Designer, building workflows is relatively easy. So, start creating workflows and try performing analytics and predictions on your data.