REPEAT
This page describes the REPEAT function in Lenses SQL.
Build an array repeating element
n
times.
Available in:
Sample code:
USE `kafka`;
SELECT
REPEAT(products, 5),
products
FROM orders-topic
LIMIT 1;
Output:
{
"value": {
"REPEAT": [
[
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
],
[
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
],
[
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
],
[
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
],
[
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
]
],
"products": [
{
"product_id": "4e774082-0c03-4751-b4dc-c3799da54f48",
"quantity": 3
}
]
}
}