Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Repeats the input a number of times.

repeat [count:int]

The repeat operator relays the input without any modification, and repeats its inputs a specified number of times. It is primarily used for testing and when working with generated data.

The number of times to repeat the input data.

If not specified, the operator repeats its input indefinitely.

Given the following events:

{number: 1, "text": "one"}
{number: 2, "text": "two"}

The repeat operator will repeat them indefinitely, in order:

repeat
{number: 1, "text": "one"}
{number: 2, "text": "two"}
{number: 1, "text": "one"}
{number: 2, "text": "two"}
{number: 1, "text": "one"}
{number: 2, "text": "two"}
// …
head 1
repeat 5
{number: 1, "text": "one"}
{number: 1, "text": "one"}
{number: 1, "text": "one"}
{number: 1, "text": "one"}
{number: 1, "text": "one"}

Last updated: