mysql - Sqoop psql query with dates -


hi have issues querying swoop , psaldb

     sqoop import --connect 'jdbc:postgresql://xx.xx.xxx.xx:xxxxx/database' --query 'select * report transact_time = '20160603-00:00:01' , $conditions' --username uname --target-dir /user/x/data --split-by transact_time 

i following error :

  error executing statement: org.postgresql.util.psqlexception: error: syntax error @ or near ":"   position: 61   org.postgresql.util.psqlexception: error: syntax error @ or near ":" 

you need issue query wrapped double quotes (") using single quotes (') in query , have use \$conditions instead of $conditions disallow shell treating shell variable.

try:

--query "select * report transact_time = '20160603-00:00:01' , \$conditions" 

Comments