Hive建表的时候虽然可以指定字段分隔符,不过用insert overwrite local directory这种方式导出文件时,字段的分割符会被默认置为\001,一般都需要将字段分隔符转换为其它字符, 可以使用下面的命令:sed -e 's/\x01/|/g' file 可以将|替换成自己需要的分隔符,file为hive导出的文件. sed -i 's/\x01/\t/g' file *`; do sed -i 's/\x01/\t/g' $f done
环境 sqoop-1.4.6 一.基本命令1.帮助命令 [root@node101 ~]# sqoop help Warning: /usr/local/sqoop-/../hbase does not exist! HBase imports will fail. Please set $HBASE_HOME to the root of your HBase installation. Warning: /usr/local/sqoop-/../hcatalog does not exist