hive 报错Parse Error: line 1:0 character '' not supported here

背景:

本地写好hql文件,用notepad++编辑,后上传到linux环境下,

用 hive -f  test.hql执行,执行直接报错:

FAILED: Parse Error: line 1:0 character '?' not supported here
但是在hive命令行下却可以,

原因: window下 test.hql文件编码和linux环境的不一致造成

处理方式:  window下降 test.hql用notepad++ 以 格式/以UTF-8 无BOM格式编码方式保存后在上传到linux环境, 后在执行 hive -f test.hql文件即可。

猜你喜欢

转载自chengjianxiaoxue.iteye.com/blog/2265394