Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Atualizado 22/11/2024
Send us feedback
json_array_length
Applies to: Databricks SQL Databricks Runtime
Returns the number of elements in the outermost JSON array.
json_array_length(jsonArray)
jsonArray: A JSON array.
jsonArray
An INTEGER.
The function returns NULL if jsonArray is not a valid JSON string or NULL.
NULL
> SELECT json_array_length('[1,2,3,4]'); 4 > SELECT json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]'); 5 > SELECT json_array_length('[1,2'); NULL
json_object_keys function
: operator
json_array_length function
json_tuple table-valued generator function
from_json function
get_json_object function
schema_of_json function
to_json function