Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex DataLens
    • Overview
    • Formula syntax
      • All Functions
        • Overview
        • ASCII
        • CHAR
        • CONCAT
        • CONTAINS
        • ENDSWITH
        • FIND
        • ICONTAINS
        • IENDSWITH
        • ISTARTSWITH
        • LEFT
        • LEN
        • LOWER
        • LTRIM
        • REGEXP_EXTRACT
        • REGEXP_EXTRACT_ALL
        • REGEXP_EXTRACT_NTH
        • REGEXP_MATCH
        • REGEXP_REPLACE
        • REPLACE
        • RIGHT
        • RTRIM
        • SPACE
        • SPLIT
        • STARTSWITH
        • SUBSTR
        • TRIM
        • UPPER
        • UTF8
      • Function Availability
    • Parameters
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. String functions
  4. SPLIT

SPLIT

Written by
Yandex Cloud
Improved by
amatol
Updated at November 6, 2024

SyntaxSyntax

SPLIT( orig_string [ , delimiter [ , part_index ] ] )

DescriptionDescription

It splits orig_string into a sequence of substrings using the delimiter character as separator and returns the substring whose number is equal to the part_index parameter. By default, the delimiting character is comma. If part_index is negative, the substring to return is counted from the end of orig_string. If the number of substrings is less than the part_index absolute value, the function returns an empty string. If part_index was not provided, the function returns an array of the substrings (only for ClickHouse, PostgreSQL sources).

Argument types:

  • orig_string — String
  • delimiter — String
  • part_index — Integer

Return type: Depends on argument types

Note

Only constant values are accepted for the arguments (delimiter).

ExamplesExamples

SPLIT("192.168.0.1", ".", 1) = "192"
SPLIT("192.168.0.1", ".", -1) = "1"
SPLIT("192.168.0.1", ".", 5) = ""
SPLIT("192.168.0.1", ".") = "['192 ','168 ','0 ','1']"
SPLIT("192.168.0.1") = "192.168.0.1"
SPLIT("a,b,c,d") = "['a','b','c','d']"

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, MySQL 5.7, PostgreSQL 9.3, Yandex Documents, YDB.

Was the article helpful?

Previous
SPACE
Next
STARTSWITH
Yandex project
© 2025 Yandex.Cloud LLC