Repeat
Use the Repeat tool to replicate every row in your data set any number of times.
When to use this tool
Use when you want to repeat rows in your data set.
Input
The Repeat tool requires one data input.
Configuration
Use the following configuration options to help replicate your data.
Go to the Pipes module from the side navigation bar.
From the Pipes tab, click an existing pipe to open, or create a new pipe. To create a new pipe, read the Creating a pipe documentation.
In the Pipe builder, add a data source to your pipe. For more information on adding a data source, see the Data Input tool.
Click
+ Tool.The Tools modal opens, where you can add tools, such as the Aggregate tool, to your pipe.
In the search bar, type Repeat. Click + Add tool.
Tip
You can also find the Repeat tool in the Clean section.
Click the tool node and drag the line to the next tool to connect the tools. If you need to undo the action, click the line and then click Unlink.
In the configuration pane, under Repetition frequency, enter the number of repetitions or click the up or down arrows until you get the desired number.
Caution
If your output data set includes more than 10 million rows, this could impact performance.
Under Enable repetition count, enable to turn on the identification of the number of repetitions per row.
Note
Enabling the count adds a repetition count column.
Under Repetition column name, enter a column name for the number of repetitions.
Click on the tool name to rename your tool node to a meaningful name. Name your tools in a way that describes the function, not the object or the data action. For example, use “Look up rate” instead of “Join to rate table”.
Use case
Use the Repeat tool to repeat your data a specified number of times. This repeated data can be used to test different logic and and choose the most effective approach. Combine the Repeat tool with the Random number generator tool to support forecasting through simulations.
For example, use the Repeat tool to repeat the dataset 100 times. Then, add the Random number generator tool to the pipe. The Random number generator tool will generate 100 simulations based on these repeats, which can be used to forecast different outcomes. You will need to specify the original dataset in the Random number generator tool, so it can partition by the repeat ID and learn the distribution from the original data.