SPLIT_PART

Learn how to use the SPLIT_PART string function in PlaidCloud Lakehouse. Splits a string by a delimiter and returns the element at a specified index.

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

Analyze Syntax

func.split_part(<str>, <delimiter>, <index>)

Analyze Examples

func.split_part('a-b-c', '-', 2)

┌─────┐
 'b'  
└─────┘

SQL Syntax

SPLIT_PART(<str>, <delimiter>, <index>)

SQL Examples

SELECT SPLIT_PART('a-b-c', '-', 2);

┌───┐
 b  
└───┘