JSON_LENGTH
Learn how to use the JSON_LENGTH json function in PlaidCloud Lakehouse. Returns the number of elements in a JSON object or array - with syntax and examples.
Returns the number of elements in a JSON object or array.
Analyze Syntax
func.json_length(get_column(table, 'data'))
Analyze Examples
func.json_length(get_column(table, 'data'))
┌───┐
│ 2 │
└───┘
SQL Syntax
JSON_LENGTH(<data>)
SQL Examples
SELECT JSON_LENGTH(PARSE_JSON('{"name":"Alice","age":30}'));
┌───┐
│ 2 │
└───┘