sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vineet Mishra <clearmido...@gmail.com>
Subject Sqoop Free Form Import Query Breaks off
Date Thu, 25 Dec 2014 13:24:21 GMT
Hi All,

I am facing a issue while Sqoop(Sqoop version: 1.4.3-cdh4.7.0) Import, I am
having a Java threaded code to import data from multiple databases running
at different servers.

Currently I am doing a Java Process Execute something like to execute sqoop
job,

Runtime.getRuntime().exec("/usr/bin/sqoop import --driver
com.vertica.jdbc.Driver  --connect jdbc:vertica://host:port/db  --username
user --password pwd --query 'select * from table WHERE $CONDITIONS'
--split-by id --target-dir /user/hive/warehouse/data/db.db/table
--fields-terminated-by '\t' --hive-drop-import-delims -m 1")

I am executing the above command as it is and running into exception saying,

WARN tool.BaseSqoopTool: Setting your password on the command-line is
insecure. Consider using -P instead.
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Error parsing arguments for
import:
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument: *
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument: from
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument: table
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument: WHERE
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument:
$CONDITIONS'
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument:
--split-by
14/12/25 18:38:29 ERROR tool.BaseSqoopTool: Unrecognized argument: id
.
.
.
Although I can easily understand the error and reason of the fact as sqoop
is internally splitting the command by space and taking the KV which is
splitting the free form query as otherwise its runs fine with the table
parameter instead, but if I run the same command directly from the command
line it works like a charm.

wanted to know is there's something that I am missing while going this way,

If no,

then why is this issue hitting and what's the work around?

Urgent Call!

Thanks!

Mime
View raw message