elasticsearch/docs/reference/query-languages/esql/_snippets/functions/repeat.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
615 B
Markdown
Raw Normal View History

## `REPEAT` [esql-repeat]
**Syntax**
:::{image} ../../../../../images/repeat.svg
:alt: Embedded
:class: text-center
:::
**Parameters**
`string`
: String expression.
`number`
: Number times to repeat.
**Description**
Returns a string constructed by concatenating `string` with itself the specified `number` of times.
**Supported types**
| string | number | result |
| --- | --- | --- |
| keyword | integer | keyword |
| text | integer | keyword |
**Example**
```esql
ROW a = "Hello!"
| EVAL triple_a = REPEAT(a, 3)
```
| a:keyword | triple_a:keyword |
| --- | --- |
| Hello! | Hello!Hello!Hello! |