Support Questions
Find answers, ask questions, and share your expertise

import SAP data using Sqoop Error

Explorer

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

Explorer

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