Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

import SAP data using Sqoop Error

Highlighted

import SAP data using Sqoop Error

New Contributor

Hello All, please i am trying to move data from sqoop into HDFS using sqoop. The database is available in the ZSLT_SHE schema, and the name of the table i am trying to import is ADR6. i will attach a screenshot.

I am using this command to import the table but running into an error.

sqoop import --connect 'jdbc:sap://x.x.x.x:xxxxx/?database=HXE&user=xxxxxxx&password=xxxxxx' --table ZSLT_SH20.ADR20 --driver com.sap.db.jdbc.Driver --hive-import --hive-overwrite --split-by CLIENT -m 1

I get an error that says

at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162) Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near ".": line 1 col 205 (at pos 205)

schema.png

2 REPLIES 2

Re: import SAP data using Sqoop Error

Super Mentor

@Abifoluwa Oni

Looks like the "--table ZSLT_SH20.ADR20" might be causing the issue here as it has Special characters.

Can you please try using a escape character for DOT there something like described in

https://issues.apache.org/jira/browse/SQOOP-1722

.

Re: import SAP data using Sqoop Error

New Contributor

Thank you @Jay SenSharma for the help, i ended up doing something like this to move the data.

sqoop import --username ***** --password ***** . --connect 'jdbc:sap://*.*.*.*:39015/?currentschema=ZSLT_SHE' --table ADR6 --driver com.sap.db.jdbc.Driver --hive-import -direct

Don't have an account?
Coming from Hortonworks? Activate your account here