Copy steps, actions and fields
Note: Starting in version 2020.4.1, you can now create and edit flows in Tableau Server and Tableau Online. The content in this topic applies to all platforms, unless specifically noted. For more information about authoring flows on the web, see Tableau Prep on the Web.
When cleaning your data you often perform the same cleaning operations or actions over and over throughout your flow. To help make cleaning and shaping your data more efficient, you can copy and paste operations or actions throughout your flow, or even copy selected steps or groups and save them so you can perform cleaning operations or actions once, then reuse it where you need it. You can even duplicate fields to experiment with different cleaning operations.
For more information about creating groups in your flow, see Group steps.
Copy one or more steps to use them in another area of the same flow. This option is not available for Input steps that include a wildcard union.
In the Flow pane, select one or more steps or group in the flow.
Right-click or Ctrl-click (MacOS) on the selected step, then select Copy.
To paste the copied steps do one of the following:
- Hover over a step or flow line until the plus icon appears, then click the icon and select Paste from the menu.
- Right-click or Ctrl-click (MacOS) in any whitespace in the canvas and click Paste.
If you pasted the steps in the flow whitespace, drag and drop the steps to where you want to place them in the flow. If adding steps to the end of a flow step, the steps are automatically added to the end of the step. If inserting steps between existing flow steps, move the steps where you want them in the flow and fix any errors.
You can remove flow lines or move steps around if needed. For example to connect a step to the copied steps, remove the existing flow line if there is one, then drag the existing step to the new step and drop on Add.
For more information about organizing your flow, see Reorganize the layout of your flow (Link opens in a new window).
You can copy and paste cleaning operations in the same flow to reuse your actions using one of the following options:
- Copy an operation from the Changes pane in one step and paste it in the Changes pane for the same step or another step to apply that same operation in that step.
- Drag and drop an operation from the Changes pane and drop it to other fields in the Profile pane for that step to apply that operation to multiple fields. This option is not available for operations that impact multiple fields, such as calculated fields.
To copy and paste a change in a step to the same step or another step, do the following:
- In the Changes pane select the change you want to copy.
Right-click or Ctrl-click (MacOS) on the change item, then select Copy from the menu.
In the Changes pane where you want to past the change right-click or Ctrl-click (MacOS) and select Paste. Select the change and click on Edit to make any adjustments as needed.
To drag and drop a change to other fields in the step do the following:
- In the Changes pane select the change you want to copy.
Drag the change over the field where you want to apply it and drop it. Repeat this action as needed.
Starting in Tableau Prep Builder version 2019.2.3 and later and on the web, if you wanted to experiment with your cleaning operations on a field but don't want to change the original data, you can copy your fields .
In the profile pane, data grid, results pane, or list view, select the field you want to copy.
From the More options menu, select Duplicate Field.
A new field is created with the same name and a modifier. For example, "Ship Date -1".
Note: Reusable flow steps can't be created on the web, but you can use them in your web flows. Reusable steps that include file-based input steps are not yet supported on the web.
If you commonly perform the same actions over and over again with your data and you want to apply these same steps in other flows, in Tableau Prep Builder version 2019.3.2 and later, you can select one or more flow steps or groups and their associated actions or the entire flow and save it locally to a file on your computer. You can also or publish it to Tableau Server or Tableau Online to share with others.
When the flow steps are published to your server, a Saved Steps tag is automatically added so you can easily search and find them when adding them to your flows.
Create reusable steps
Select one or more steps.
Right-click or Ctrl-click (MacOS) on a selected step and select Save Steps as Flow.
Select Save to File to save the flow locally or Publish to Server to publish the flow to Tableau Server or Tableau Online.
If you publish the flow to Tableau Server or Tableau Online, sign into your server if needed, then complete the fields in the Publish Flow dialog then click Publish.
Insert reusable steps in a flow
Open a flow.
In the flow pane, do one of the following:
- Hover over a step or flow line until the plus icon appears, then click the icon and select Insert Flow.
- In the white area of the canvas, right-click or Ctrl-click (MacOS) and click Insert Flow or click Edit > Insert Flow from the top menu.
Flow Step menu Canvas menu
In the Add Flow dialog, select from flows saved to either your local file or your server, then click Add. The list of flows is automatically filtered to show flows tagged with Saved Steps. To insert other flows, change the Flow Type to All Flows.
In Tableau Prep Builder version 2019.4.2 and later and on the web, you can click View Flow to open and view the published flow in the server you are signed into.
The flow is added to the flow pane. If adding a flow to the end of a flow step, the flow steps are automatically added to the end of the step. If inserting flow steps between existing flow steps, move the steps where you want them in the flow and fix any errors.