嗨,我对swoop和psaldb有疑问
Sqoop import --connect 'jdbc:postgresql://xx.xx.xxx.xx:xxxxx/database' --query 'select * from report where transact_time = '20160603-00:00:01' and $CONDITIONS' --username uname --target-dir /user/x/data --split-by transact_time
我得到以下错误:
Error executing statement: org.postgresql.util.PSQLException: ERROR: syntax error at or near ":"
Position: 61
org.postgresql.util.PSQLException: ERROR: syntax error at or near ":"
1条答案
按热度按时间zlhcx6iw1#
您需要发出用双引号括起来的查询(
"
)因为你用的是单引号('
)在查询中,您必须使用\$CONDITIONS
而不仅仅是$CONDITIONS
禁止shell将其视为shell变量。尝试: