Sqoop import Error during import from SAP Hana to Hadoop

I would like to import table data from SAP Hana to Hadoop. For one table, I was able to execute query successfully and data ingested into Hadoop from SAP Hana. But when I am trying for another table I am getting the following issue.Facing issue from yesterday.

Here are the query & Error as follows.I request to help me in this regard

Query:

sqoop import --driver com.sap.db.jdbc.Driver \
--connect "hostname/schemaname" \
--username teja \
--password mypwd \
--table test \
--target-dir "output" \
--m 1;

Error:

Error: java.io.IOException: SQLException in nextKeyValue Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "/":

Thanks in advance.

Answers


Try using the --query argument instead of --table command and see if that works for you:

sqoop import --driver com.sap.db.jdbc.Driver \
--connect "<hostname>:<port>?currentschema=<schemaname>" \
--username teja \
--password mypwd \
--query "select * from test where $conditions" \
--target-dir "output" \
--m 1;

Need Your Help

How do I embed a swf with 100% width and height using swfObject and spark?

javascript html actionscript-3 flash swfobject

I use swfObject and embed my object using 100% for the width and height values.

RCU.bat file not opening on virtual machine

debugging batch-file

I have installed a Windows 2008 Server on my VM. I am trying to run a .bat file (on my VM). This .bat file is stored on my local Windows 7 PC, and I'm using shared folders to access it.