[ https://issues.apache.org/jira/browse/SQOOP-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547510#comment-16547510 ]
Tom Ellis commented on SQOOP-3344: ---------------------------------- I found a workaround [here|https://community.hortonworks.com/questions/142232/import-sap-data-using-sqoop-error.html] where you can specify the schema in the connection string. > Using --table fails for Sybase when specifying a table name that includes > owner > ------------------------------------------------------------------------------- > > Key: SQOOP-3344 > URL: https://issues.apache.org/jira/browse/SQOOP-3344 > Project: Sqoop > Issue Type: Bug > Components: connectors/generic > Affects Versions: 1.4.6, 1.4.7 > Reporter: Tom Ellis > Priority: Major > Fix For: 3.0.0 > > Attachments: SQOOP-3344.patch > > > When attempting to use the {{--table}} parameter with a Sybase table that > includes the owner definition (i.e. OWNER.TABLENAME) causes mappers to fail > with: > {code:java} > com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near '.'. at > com.sybase.jdbc3.tds.Tds.a(Unknown Source) > {code} > > This is because in DataDrivenDBRecordReader an alias is added if the DB > product name isn't one of the ones specified: > {code:java} > if (!dbProductName.startsWith("ORACLE") > && !dbProductName.startsWith("DB2") > && !dbProductName.startsWith("MICROSOFT SQL SERVER") > && !dbProductName.startsWith("POSTGRESQL")) { > // The AS clause is required for hsqldb. Some other databases might have > // issues with it, so we're skipping some of them. > query.append(" AS ").append(tableName);{code} > Sybase breaks because just using the tablename includes the '.' character and > this is invalid for a table alias. The patch attached includes adding > "ADAPTIVE SERVER ENTERPRISE" as another product that adding the alias should > be skipped for to keep consistency with the current code. -- This message was sent by Atlassian JIRA (v7.6.3#76005)