MaxCompute中string 转array 有啥好的方法没?
使用cast(
as
) 函数,示例 :select cast('['苹果','香蕉','葡萄']' as array);
cast函数参考:https://help.aliyun.com/document_detail/48976.html?spm=a2c4g.11186623.6.707.7eeb1efaQXX3Ba#section-bpc-dy1-wdb
支持的type: https://help.aliyun.com/document_detail/159541.html?spm=a2c4g.11186623.6.648.6c236fd05AAv1i ,其中包含array。
另外也可以使用udtf函数来操作array,语法同Java和sql, https://help.aliyun.com/document_detail/147118.html?spm=a2c4g.11186623.6.731.3c3b6fd0hVPAHB
赞0
踩0