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' –