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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -