SUBSTRING_INDEX (Lakehouse v2)
Returns a substring from a string before or after a specified number of delimiter occurrences.
Analyze Syntax
Section titled “Analyze Syntax”func.substring_index(<str>, <delim>, <count>)Analyze Examples
Section titled “Analyze Examples”func.substring_index('www.example.com', '.', 2)
┌───────────────┐│ 'www.example' │└───────────────┘SQL Syntax
Section titled “SQL Syntax”SUBSTRING_INDEX(<str>, <delim>, <count>)SQL Examples
Section titled “SQL Examples”SELECT SUBSTRING_INDEX('www.example.com', '.', 2);
┌─────────────┐│ www.example │└─────────────┘