'SemanticException while execute sql query statement with chinese on HUE web ui

when I use hive sql with chinese comment to create table on the web(HUE), it pops up 'ascii codec can't encode characters in position', then I tried to chang python default encod into utf8 to fix it, but the exception change into semantic exception. I double check on hive with beeline connection, it can execute ddl,dql with chinese successfully, such as 'select *, 'chinese中文' as test from tb_name', 'create table tb_name (id string comment 'chinese中文') comment 'chinese中文' row format ....' 'desc formatted tb_name'. I also change corresponding column with utf8 on desktop_document2 which in the hue's metastore to make shure chinese can show on the ui. till now I gussing encoding get worng between typing on ui and execut stage. need help, thank you so much.

btw, hue is 4.10 and hive is 2.3.7. same problem when query mysql table, but I added jdbc dialect '?characterEncoding=UTF-8' to fix it. hope it can provide inspiration.

hue


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source