-o
保存执行结果到文件
当使用impala-shell -o a.txt进入impala-shell之后,查询报错:
报错情况:
Query: select * from dim_sales_dept
Unknown Exception : 'ascii' codec can't encode characters in position 559-562: ordinal not in range(128)
解决方案:
问题在于python编码;
在impala-shell.py首部加入以下部分即可
28 import sys
29 import time
30 # add by niewj start
31 reload(sys)
32 sys.setdefaultencoding('utf-8')
33 # add by niewj end
34
[2016-08-12]
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。