我想從使用自由格式查詢的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的描述 –