我想从 AWS 中的 Athena 获取结果值格式 JSON。
当我从 Athena 中选择时,结果格式如下。
{test.value={report_1=test, report_2=normal, report_3=hard}}
有没有办法获得 JSON 格式的结果而不用将“=”替换为“:”?
列格式为
map<string,map<string,string>>
select mycol
from mytable
;
+--------------------------------------------------------------+
| mycol |
+--------------------------------------------------------------+
| {test.value={report_3=hard, report_2=normal, report_1=test}} |
+--------------------------------------------------------------+
select cast (mycol as json) as json
from mytable
;
+--------------------------------------------------------------------------+
| json |
+--------------------------------------------------------------------------+
| {"test.value":{"report_1":"test","report_2":"normal","report_3":"hard"}} |
+--------------------------------------------------------------------------+
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)