SPLIT

Syntax

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

Description

Returns a substring from orig_string using the delimiter delimiter character to divide the string into a sequence of part_index parts. Delimiter is a comma by default. If part_index is not passed, an array is returned (only for ClickHouse, PostgreSQL sources)

Argument types:

  • orig_stringString
  • delimiterString
  • part_indexInteger

Return type: Depends on argument types

Note

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

Data source support

ClickHouse 19.13, MySQL 5.6, PostgreSQL 9.3.

Previous