语句如下:
sqoop import --connect 'jdbc:sqlserver://192.168.1.1:1433;database=Reports;username=xxxx;password=xxxx' \ --query " select t1.*,convert(varchar(10),paid_time,23) as date from orders t1 where convert(varchar(10),paid_time,23)
between '2016-06-01' and '2016-06-03' and \$CONDITIONS " \ --fields-terminated-by "\001" --lines-terminated-by "\n" \ --m 4
--split-by store_nbr --target-dir /ecommerce/orders_tmp --delete-target-dir --null-non-string 0 --hive-drop-import-delims \
--hive-import --hive-overwrite --create-hive-table --hive-database fresh --hive-table orders_tmp
Leave a Reply