Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex DataLens
    • Overview
    • Formula syntax
    • Neuroanalyst for creating calculated fields
      • All Functions
        • Overview
        • ARRAY
        • ARR_AVG
        • ARR_DISTINCT
        • ARR_INDEX_OF
        • ARR_INTERSECT
        • ARR_MAX
        • ARR_MIN
        • ARR_PRODUCT
        • ARR_REMOVE
        • ARR_STR
        • ARR_SUM
        • CAST_ARR_FLOAT
        • CAST_ARR_INT
        • CAST_ARR_STR
        • CONTAINS
        • CONTAINS_ALL
        • CONTAINS_ANY
        • CONTAINS_SUBSEQUENCE
        • COUNT_ITEM
        • GET_ITEM
        • LEN
        • REPLACE
        • SLICE
        • STARTSWITH
        • UNNEST
      • Function Availability
    • Parameters
  • DataLens Gallery
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Array functions
  4. REPLACE

REPLACE (array)

Written by
Yandex Cloud
Updated at December 19, 2025
View in Markdown

Function REPLACE is also found in the following categories: String functions.

SyntaxSyntax

REPLACE( array, old, new )

DescriptionDescription

Replaces each array element equal to old with new.

Argument types:

  • array — Array of fractional numbers | Array of integers | Array of strings
  • old — Fractional number | Integer | String
  • new — Fractional number | Integer | String

Return type: Same type as (array)

ExampleExample

[array] REPLACE([array], 300, -1) REPLACE([array], NULL, 0)
'[100,300,200,100,300]' '[100,-1,200,100,-1]' '[100,300,200,100,300]'
'[100,300,NULL,NULL]' '[100,-1,NULL,NULL]' '[100,300,0,0]'
'[150,NULL,130,192]' '[150,NULL,130,192]' '[150,0,130,192]'

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, PostgreSQL 9.3, Trino, Yandex Documents.

Was the article helpful?

Previous
LEN
Next
SLICE
© 2026 Direct Cursus Technology L.L.C.