<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: please help with SQOOP IMPORT in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189476#M65245</link>
    <description>&lt;P&gt;worked like a charm. thanks&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 10:04:44 GMT</pubDate>
    <dc:creator>brar5353</dc:creator>
    <dc:date>2017-07-20T10:04:44Z</dc:date>
    <item>
      <title>please help with SQOOP IMPORT</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189474#M65243</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;I am having trouble with my query below. Searched a lot on the internet but nothing helped. Please help me understand where the issue is&lt;/P&gt;&lt;PRE&gt;sqoop import \
--connect jdbc:mysql://10.0.0.24/hive_data \
--username root -P \
--query 'select d.driverid, d.name, SUM(t.hours_logged) as hours from driver d JOIN timesheet t on (d.driverid = t.driverid) group by d.driverid,d.name Where $CONDITIONS' --split-by d.driverid \
--target-dir /home/hadoop/sqoop \
--driver com.mysql.jdbc.Driver&lt;/PRE&gt;&lt;P&gt;The error I get is below&lt;/P&gt;&lt;PRE&gt;SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
17/07/20 01:48:14 INFO manager.SqlManager: Executing SQL statement: select d.driverid, d.name, SUM(t.hours_logged) as hours from driver d JOIN timesheet t on (d.driverid = t.driverid) group by d.driverid,d.name Where  (1 = 0)
17/07/20 01:48:14 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'Where  (1 = 0)' at line 1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'Where  (1 = 0)' at line 1&lt;/PRE&gt;&lt;P&gt;please help&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 08:57:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189474#M65243</guid>
      <dc:creator>brar5353</dc:creator>
      <dc:date>2017-07-20T08:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: please help with SQOOP IMPORT</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189475#M65244</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/19423/brar5353.html" nodeid="19423"&gt;@Harjinder Brar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Mysql statement construction is not correct where should be before group by like this:&lt;/P&gt;&lt;P&gt;--query 'select d.driverid, d.name, SUM(t.hours_logged) as hours from driver d JOIN timesheet t on (d.driverid = t.driverid) &lt;STRONG&gt;Where $CONDITIONS group by d.driverid,d.name'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This should fix the issue.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 09:57:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189475#M65244</guid>
      <dc:creator>rbiswas1</dc:creator>
      <dc:date>2017-07-20T09:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: please help with SQOOP IMPORT</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189476#M65245</link>
      <description>&lt;P&gt;worked like a charm. thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 10:04:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189476#M65245</guid>
      <dc:creator>brar5353</dc:creator>
      <dc:date>2017-07-20T10:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: please help with SQOOP IMPORT</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189477#M65246</link>
      <description>&lt;P&gt;Np. Glad that it worked &lt;A rel="user" href="https://community.cloudera.com/users/19423/brar5353.html" nodeid="19423"&gt;@Harjinder Brar&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 10:06:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-help-with-SQOOP-IMPORT/m-p/189477#M65246</guid>
      <dc:creator>rbiswas1</dc:creator>
      <dc:date>2017-07-20T10:06:31Z</dc:date>
    </item>
  </channel>
</rss>

