My hive table test_tbl has a string field tag_score, which contains some json string separated by ";":
----------
tag_score |
--------------------------------------------------------------------------------
{"keyword":"abc","score": "0.6"};{"keyword":"烟花","score":"0.516409816917747"} |
--------------------------------------------------------------------------------
How can I extract the correct json from it? The result string should be like this:
[{"keyword":"abc","score": "0.6"},{"keyword":"烟花","score":"0.516409816917747"}]
I've tried this hive sql:
select split(tag, ";") from test_tbl;
But I got array of string, not the desired one:
["{"keyword":"abc","score": "0.6"}","{"keyword":"烟花","score":"0.516409816917747"}"]