AnsweredAssumed Answered

Import Data from Sql Server Using sqoop

Question asked by Rojit on Jul 29, 2016
Latest reply on Aug 4, 2016 by Karen Whipple

Hi,

 

I am trying to import data from Sql Server using the following command:

 

sqoop import -D mapred.job.queue.name=cni_data_q1 --connect "jdbc:sqlserver://dbsed2951.ms.ds.uhc.com;database=OpsAMS_dev" \

--username OPUser --password ******  --query "select * from opsams.WorkType WHERE 1=1 \$CONDITIONS" \

--target-dir /home/rthoma43

 

The result doesn't throw any error. However in the target directory there is no file that gets created. Following is the result set after running the above script.

 

cat: /opt/mapr/zookeeper/zookeeperversion: No such file or directory

Warning: /opt/mapr/sqoop/sqoop-1.4.6/bin/../../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

Warning: /opt/mapr/zookeeper/zookeeper- does not exist! Accumulo imports will fail.

Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.

16/07/29 08:39:43 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-mapr-1601

16/07/29 08:39:43 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.

When importing query results in parallel, you must specify --split-by.

Try --help for usage instructions.

 

I am a newbie, any help much appreciated.

 

Thanks

Rojit

Outcomes