<?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: Load data from SQL table into Hive table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171670#M54200</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/15511/angelo34jj.html" nodeid="15511"&gt;@Angelo Alexander&lt;/A&gt;&lt;P&gt;If you are trying the "sqoop" command, you have to try on linux CLI, where sqoop client should have installed. And proper JDBC driver should be copied to sqoop lib location.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 12:56:55 GMT</pubDate>
    <dc:creator>rajsyrus</dc:creator>
    <dc:date>2017-02-14T12:56:55Z</dc:date>
    <item>
      <title>Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171662#M54192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have installed HDP into a RHEL 7 environment with 3 RHEL 7 servers. &lt;/P&gt;&lt;P&gt;I need to import data from a SQL table into a Hive table in the HDP.&lt;/P&gt;&lt;P&gt;Can I get some help as to what the best way is to do this?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:04:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171662#M54192</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2022-09-16T11:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171663#M54193</link>
      <description>&lt;P&gt;Easist, Use Apache NiFi, using the UI to move data from any RDBMS to hive table. You can use hive streaming option as well with apache nifi.  Full details on how to do this is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/45706/using-the-new-hiveql-processors-in-apache-nifi-070.html" target="_blank"&gt;https://community.hortonworks.com/articles/45706/using-the-new-hiveql-processors-in-apache-nifi-070.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also you can use Sqoop.  Full details on how to sqoop data from RDMBS to hive/hadoop and back is here&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_dataintegration/content/using_sqoop_to_move_data_into_hive.html" target="_blank"&gt;http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_dataintegration/content/using_sqoop_to_move_data_into_hive.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just as an example, to move entire table from mysql into a hive table named EMPLOYEES:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;PRE&gt;sqoop import --connect jdbc:mysql://db.foo.com/bar --table EMPLOYEES&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Or only latest data&lt;/P&gt;&lt;PRE&gt;sqoop import --connect jdbc:mysql://db.foo.com/bar --table EMPLOYEES  --where "start_date &amp;gt; '2010-01-01'"
&lt;/PRE&gt;&lt;P&gt;or using a query&lt;/P&gt;&lt;PRE&gt;sqoop import --query 'SELECT a.*, b.* FROM a JOIN b on (a.id == b.id)
WHERE $CONDITIONS' --split-by a.id --target-dir /user/foo/joinresults&lt;/PRE&gt;&lt;P&gt;I would by default use NiFi since it is the easiest way to get data into hive/hadoop&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:11:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171663#M54193</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2017-02-13T13:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171664#M54194</link>
      <description>&lt;P&gt;the source table is MS SQL table&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:15:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171664#M54194</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-13T13:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171665#M54195</link>
      <description>&lt;P&gt;For sql server I have often used this article&lt;/P&gt;&lt;P&gt;&lt;A href="https://danieladeniji.wordpress.com/2013/05/06/hadoop-sqoop-importing-data-from-microsoft-sql-server/"&gt;https://danieladeniji.wordpress.com/2013/05/06/hadoop-sqoop-importing-data-from-microsoft-sql-server/&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Syntax:
      sqoop import --connect jdbc:sqlserver://sqlserver-name \
          --username &amp;lt;username&amp;gt; \
          --password &amp;lt;password&amp;gt; \
          --driver   &amp;lt;driver-manager-class&amp;gt; \
          --table    &amp;lt;table-name&amp;gt; \
          --target-dir  &amp;lt;target-folder-name&amp;gt;

Sample: 
      sqoop import --connect "jdbc:sqlserver://labDB;database=demo" \
           --username sqoop  \
           --password simp1e \
           --driver   com.microsoft.sqlserver.jdbc.SQLServerDriver \
           --table    "dbo.customer" \
           --target-dir  "/tmp/dbo-customer"
          


&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:20:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171665#M54195</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2017-02-13T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171666#M54196</link>
      <description>&lt;P&gt;trying that command, getting the following error:&lt;/P&gt;&lt;P&gt;NoViableAltException(26@[])
        at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:                                                                                                                                                             1084)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:20                                                                                                                                                             2)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:16                                                                                                                                                             6)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:437)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:320)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1219)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1260)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1156)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1146)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:2                                                                                                                                                             16)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:168)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:379)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:739                                                                                                                                                             )
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:684)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:624)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                                                                                             java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                                                                                             sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
FAILED: ParseException line 1:0 cannot recognize input near 'sqoop' 'import' '&amp;lt;E                                                                                                                                                             OF&amp;gt;'&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 07:40:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171666#M54196</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-14T07:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171667#M54197</link>
      <description>&lt;P&gt;I issued this command within hive. Looks like I need to issue this command from Linux?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 07:54:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171667#M54197</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-14T07:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171668#M54198</link>
      <description>&lt;P&gt;also the parameter  --target-dir  "/tmp/dbo-customer" is this the location in Hive, or rather how do I make this import end up in a Hive table of a particular Hive database&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 08:56:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171668#M54198</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-14T08:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171669#M54199</link>
      <description>&lt;P&gt;one more observation; when I issue sqoop import \ it goes to the next line with "&amp;gt;" prompt. Even after entering the next parameters it's still in "&amp;gt;". How do I complete the command and make it executed?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:26:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171669#M54199</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-14T09:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171670#M54200</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/15511/angelo34jj.html" nodeid="15511"&gt;@Angelo Alexander&lt;/A&gt;&lt;P&gt;If you are trying the "sqoop" command, you have to try on linux CLI, where sqoop client should have installed. And proper JDBC driver should be copied to sqoop lib location.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:56:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171670#M54200</guid>
      <dc:creator>rajsyrus</dc:creator>
      <dc:date>2017-02-14T12:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171671#M54201</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15511/angelo34jj.html" nodeid="15511"&gt;@Angelo Alexander&lt;/A&gt; &lt;/P&gt;&lt;P&gt;If you are using the "--target-dir" option with sqoop, then it is just a location on HDFS, where your output sits, you can create a external hive table on the target-dir location. Or you can use hive-create-table option with sqoop to directly create a table on hive.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 13:03:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171671#M54201</guid>
      <dc:creator>rajsyrus</dc:creator>
      <dc:date>2017-02-14T13:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171672#M54202</link>
      <description>&lt;P&gt;I just realized after running a sqoop list-databases command that I do not have the JDBC driver for MS SQL installed. How can I get that installed on my RHEL 7?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 19:13:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171672#M54202</guid>
      <dc:creator>angelo34jj</dc:creator>
      <dc:date>2017-02-14T19:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from SQL table into Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171673#M54203</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15511/angelo34jj.html" nodeid="15511"&gt;@Angelo Alexander&lt;/A&gt;  please refer to the following doc, also you can download the MySQL driver jar from MySQL website and place it in /usr/hdp/current/sqoop-client/lib &lt;A href="http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_data-movement-and-integration/content/apache_sqoop_connectors.html" target="_blank"&gt;http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_data-movement-and-integration/content/apache_sqoop_connectors.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 23:26:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Load-data-from-SQL-table-into-Hive-table/m-p/171673#M54203</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-15T23:26:50Z</dc:date>
    </item>
  </channel>
</rss>

