文本(n:1)(数据类型有问题)测试解决成功找到有问题的列进行类型转换
–query "select ordertextid,appid,orderid,texttypecode,texttypedesc,cast(text as varchar) as text,orderno,creatorid,creator,createtime,editorid,editor,edittime,remark,isdelete,yearmonth from “_xxx”.“xxxS/xxxxxx” where $CONDITIONS "
//
如果列名是/xxx/xxx用select查的时候需要 " \ /xxx/xxx \ "
//
sudo sqoop import
–connect “jdbc:sap://1.1.1.1:1”
–driver com.sap.db.jdbc.Driver
–username “name”
–password “password”
–query "select * from “_xxx”.\ "xxx/xxx \ " where $CONDITIONS "
–hcatalog-database hivedb
–hcatalog-table hivetable
–drop-and-create-hcatalog-table
–map-column-hive operatorid=string,disputesid=string --改变数据类型
–hcatalog-storage-stanza ‘stored as orc’
–null-string ‘\N’
–null-non-string ‘\N’
–m 1
//
--hive-home 重写$HIVE_HOME
--hive-import 插入数据到hive当中,使用hive的默认分隔符
--hive-overwrite 重写插入
--create-hive-table 建表,如果表已经存在,该操作会报错!
--hive-table [table] 设置到hive当中的表名
--hive-drop-import-delims 导入到hive时删除 \n, \r, and \01
--hive-delims-replacement 导入到hive时用自定义的字符替换掉 \n, \r, and \01
--hive-partition-key hive分区的key
--hive-partition-value hive分区的值
--map-column-hive 类型匹配,sql类型对应到hive类型
///