1.spoon-dir来指定导出的目录
spoon export --connect jdbc:mysql://ip:端口号/数据库名 --user 【username】--password 【password】\
--table 【table_name】\
--exprot-dir 【hive中的路径】\
2.update-mode数据更新插入,不存在的做插入。
spoon export --connect jdbc:mysql://ip:端口号/数据库名 --user 【username】--password 【password】\
--table 【table_name】\
--exprot-dir 【hive中的路径】\
--update-mode 【allowinstert/uodataonly】
3.处理hive中存储的null
spoon export --connect jdbc:mysql://ip:端口号/数据库名 --user 【username】--password 【password】\
--table 【table_name】\
--exprot-dir 【hive中的路径】\
--update-mode 【allowinstert/uodataonly】
--input-null-string '\\N'
--input-null-none-string '\\N'
4.fileds-terminated-by用来指定文件的分隔符【默认是逗号】
spoon export --connect jdbc:mysql://ip:端口号/数据库名 --user 【username】--password 【password