Sqoop的学习笔记

压缩: sqoop命令中带上-z或者–compress,即可对拉取的数据进行压缩。 默认压缩算法为gzip,导出后在hdfs中的数据,后缀默认为.gz sqoop import \ –connect jdbc:mysql://localhost:3306/horus \ –username root –password ****** \ –table data –fields-terminated-by “\0001” \ –lines-terminated-by ‘\n’ \ –null-string ‘\\N’ \ –null-non-string ‘\\N’ \ –hive-table s_data \ –hive-import \ –hive-overwrite \ –delete-target-dir \ –hive-drop-import-delims 去看看~