Skip to content

Splits a string by a delimiter and returns the element at a specified index.

func.split_part(<str>, <delimiter>, <index>)
func.split_part('a-b-c', '-', 2)
┌─────┐
'b'
└─────┘
SPLIT_PART(<str>, <delimiter>, <index>)
SELECT SPLIT_PART('a-b-c', '-', 2);
┌───┐
│ b │
└───┘