sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohamed El-Sayyad (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-3144) Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0016:Can't fetch schema -
Date Thu, 02 Mar 2017 14:29:45 GMT
Mohamed El-Sayyad created SQOOP-3144:
----------------------------------------

             Summary: Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0016:Can't
fetch schema -
                 Key: SQOOP-3144
                 URL: https://issues.apache.org/jira/browse/SQOOP-3144
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-jdbc-connector
    Affects Versions: 1.99.7
         Environment: hduser@cai-hadoop01:/usr/local/sqoop/bin$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
hduser@cai-hadoop01:/usr/local/sqoop/bin$

-----------------------------------------------------------

hduser@cai-hadoop01:/usr/local/sqoop/bin$ uname -a
Linux cai-hadoop01 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64
x86_64 GNU/Linux

            Reporter: Mohamed El-Sayyad


Requirement: Importing MySQL Database to HDFS
Minor Issue: No Unique Primary Key included in DB
Workaround: Added Year as partition Column 

Current Issue:
org.apache.sqoop.common.SqoopException: GENERIC_JDBC_CONNECTOR_0016:Can't fetch schema

Cause:
This is because a double quote is appended, which is not parsed by MySQL DB.

 Using min/max query: SELECT MIN("year"), MAX("year") FROM "sports"."players"

## Running the Query on MYSQL ##

With Double Quotes:

mysql> SELECT MIN("year"), MAX("year") FROM "sports"."players";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near '"sports"."players"' at line
1

Without Double Quotes:

mysql> SELECT MIN(year), MAX(year) FROM sports.players;
+-----------+-----------+
| MIN(year) | MAX(year) |
+-----------+-----------+
|      1950 |      2009 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql>






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message