Hive分析搜狗用户搜索日志-数据预处理(解决乱码问题) 2020-10-22 Hive macos, sougou 0 Comments Word Count: 91(words) Read Count: 1(minutes) 环境 MacOS 单机hadoop集群 Hive (内嵌模式) 预处理1. 查看数据1head Sougou.reduced 结果如下 可以发现有许多乱码 2. 查看文件编码1file Sougou.reduced 结果如下 网上查询得知Non-ISO extended-ASCII text代表gb18030 3. 使用iconv转换文件编码格式1iconv -f gb18030 -t utf-8 SogouQ.reduced>SogouQ.reduced.new 结果如下