I have a table that has a column that contains an array of strings, example ["Emily", "Anna"]
, I need to parse this array into 2 columns. Is there a way to do this in sql?
I have tried OPENJSON but this function doesn't work in databricks
Just use the array element indexes:
SELECT
mycolumn[1] AS first_value,
mycolumn[2] AS second_value
FROM
mytable
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.