0
我想要sqoop形式的MySQL,當我通過--split限制參數它不工作。從MySQL與分裂限制參數sqoop給出錯誤
sqoop import --connect jdbc:mysql://host:port/db_name --username user \
--password pass --query 'select p.* from table1 p join table2 m on \
p.id=m.id WHERE $CONDITIONS' --split-by 'p.id' --target-dir /path \
--direct --driver com.mysql.jdbc.Driver --boundary-query 'select min(id), \
max(id) from tbl_kmart_sales_predicted_weekly_class where (1 = 0)' \
--delete-target-dir --split-limit 10
錯誤是:
16/12/03 05:57:48 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
16/12/03 05:57:48 ERROR tool.BaseSqoopTool: Unrecognized argument: --split-limit
16/12/03 05:57:48 ERROR tool.BaseSqoopTool: Unrecognized argument: 10
但是,當我刪除分割限制
sqoop import --connect jdbc:mysql://host:port/db_name --username user \
--password pass --query 'select p.* from table1 p join table2 m on \
p.id=m.id WHERE $CONDITIONS' --split-by 'p.id' --target-dir /path \
--direct --driver com.mysql.jdbc.Driver --boundary-query 'select min(id), \
max(id) from tbl_kmart_sales_predicted_weekly_class where (1 = 0)' \
--delete-target-dir
我們有一個--split-limit參數。欲瞭解更多詳情,請查找附件截圖。 –
@ShwethaJog你指的是哪一個版本的sqoop?請分享文檔的鏈接。 –
版本爲:4.6 https://archive.cloudera.com/cdh5/cdh/5/sqoop/SqoopUserGuide.html#_literal_sqoop_import_literal –