sqoop import --connect jdbc:teradata://192.168.xx.xx/DBS_PORT=1025,DATABASE=ds_tbl_db --driver com.teradata.jdbc.TeraDriver --username dbc --password dbc --query 'select * from reason where id>20' --hive-import --hive-table reason_hive --target-dir <hdfs-location> -m 1
Sqoop进口与where子句
我得到了错误:
Query [select * from reason where id>20] must contain '$CONDITIONS' in WHERE clause.
我知道必须有查询Sqoop where子句。
所以,对于像
select * from reason
查询我将它修改为:
select * from reason WHERE $CONDITIONS
什么,从而提供具有where
子句的查询呢?
'和\ $ CONDITIONS'是需要的,如果你已经在双封闭查询引号。否则使用'AND $ CONDITIONS' –