我想从使用自由格式查询的oracle导入数据,并且需要以24小时格式存储时间戳。在sqoop导入中使用24小时时间戳
sqoop import --connect jdbc:oracle:thin:(server credntials) \
--username ***** --password ***** \
--query "select emp_uid, emp_name, salary, to_char(create_timestamp, 'YYYY-MM-DD HH24:MI:SS'), to_char(last_sal_update_timestamp, 'YYYY-MM-DD HH24:MI:SS'), coalesce(to_char(last_sal_update_timestamp, 'YYYY-MM-DD HH24:MI:SS'),to_char(create_timestamp, 'YYYY-MM-DD HH24:MI:SS')) as hadoop_import_timestamp from emp.emp_sal where last_sal_update_timestamp < (to_char('2013-01-21 09:16:20', 'YYYY-MM-DD HH24:MI:SS')) and \$CONDITIONS" \
--split-by "to_char(hadoop_import_timestamp, 'YYYY-MM-DD HH24:MI:SS')" \
--target-dir /user/sal/emp_sal \
--map-column-hive CREATE_TIMESTAMP=TIMESTAMP,LAST_SAL_UPDATE_TIMESTAMP=TIMESTAMP,HADOOP_IMPORT_TIMESTAMP=TIMESTAMP \
--hive-import \
--hive-table empdet.empsal \
--hive-drop-import-delims
,但我得到的数字无效错误上尝试运行它
2017-01-11
Venkat
+0
请分享错误日志和蜂巢表结构 –
+0
和Oracle表格plz的描述 –