How to… Group Steps
With the release of Tableau Prep Builder 2020.3.3 (15th September 2020), a new piece of functionality has been added to Prep that will allow users to:
Clean Up large flows by grouping sections of a workflow
Create a group of steps that perform a certain function for re-use elsewhere
This post will go through both use cases and show you how to take advantage of this new functionality.
Clean Up Large Flows
We’ve all had those challenges that grow into monster workflows as requirements either prove harder to meet than originally planned, or additional requirements get added over time. These workflows become difficult to handover to others and are also tough when you return to them after time to remember what you were trying to achieve in each part. Group Steps is going to help out in exactly these situations. Let’s take this beast from a recent tips session I ran:
We can make groups of the key stages to help simplify the documentation of the flow. Let’s use the end of this workflow to demonstrate the actions it takes to make a group…
Step-by-step of Grouping Steps
Firstly, highlight the steps that you want to group together. You do this by left-click dragging across the steps you want to collect. Here we’ve selected the three cleaning steps at the end of the flow before the output:
Next up, right-click on any of the highlighted steps to show the menu to select ‘Group’:
Congrats, you’ve created your Group and should see that the highlighted steps you selected have now disappeared and been replaced by a folder icon with a set of arrows (pointing at North East and South West if on a compass):
These arrows can be used to expand the folder to show all of the steps within, or contract the Group back to show just the folder icon.
As the Group folder icon gives little away about what is within it, we’d recommend making sure you name and add a description to your Group in the way you would with any other step.
Back to Cleaning up Large Flows
Therefore, by using the Group functionality, we can minimise large number of steps to make the flow easier than ever to traverse and, if handed over to another user, more clearly documented about what set of steps are doing what.
By grouping other areas of our flow together, we can really simplify the stages of this data transformation:
With the ability for all users to expand the section(s) they need to understand further, Group Steps is a great addition to documenting flows. Groups can’t be ‘grouped’ inside each other so you may want to plan your Groups when documenting your workflow. You can remove the steps from a Group but right-clicking on the Group and selecting ‘Ungroup’:
Group for re-use
Grouping steps doesn’t have to just be for documentation but for useful functions too. Let’s go through one use case where the ability to Group will help to make useful functionality elsewhere without having to re-write the steps and calculations.
In this use case, we will take the output of a Union step and make the resulting data even more useful. An additional field is added to a data set after using a Union step called ‘Table Names’. If you want to follow along with this exercise you can find the data here.
In this example, we want to pick up the Country Name (England or Scotland) and the Date. The sheets in this Excel Workbook have a consistent naming convention and if the same is found elsewhere, the chance to copy the solution into other flows will be useful. As can be seen from the Changes pane below, there are a few fun calculations to solve to get the data points we want.
The combination of the Union step and Clean step can be now used in other workflows. You still save steps in the same way as before with flowlets: select the steps inside the group, right-click on those steps, go-to ‘Save Steps as Flow’ and choose where you want to save the flow too.
Now you can enter those steps into any other flow but they enter the new flow already Grouped together:
Summary
There we go, a neat piece of functionality that is good for documentation as well as making your work more reusable across all your workflows.